• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • We are looking for U.S.-based freelancer or agency working with SEO or WordPress for a quick 30-min interviews to gather feedback on XOVI, a successful German SEO tool we’re looking to launch in the U.S.
    If you qualify and participate, you’ll receive a $30 Amazon gift card as a thank-you. Please apply here. Thanks for helping shape a better SEO product for agencies!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

Question git pull from Github

Symer

New Pleskian
Server operating system version
Debian 11.9
Plesk version and microupdate number
Plesk Obsidian 18.0.60 Mise à jour 1
Hello everyone.
I'm new to my git / github.
I managed to install git on my PC, push to Github and have github send the information (webhook) to Plesk so that it pulls the commit.

But I have a question, is it possible to pull the FTP content that is present on Plesk from Github?

Indeed, I have a Prestashop site and sometimes if a module does not work the developer intervenes directly on the FTP. So I would like to pull his modifications to be able to see what he did and keep files up to date on Github?

Thanks in advance.

PS: Sorry for my English, it is translated from google translate.
 
The GIT extension can only be used to Pull from a remote repository (like Github).

If I understand correctly you sometime upload files manually to your website and want to Commit and Push those changes to your repository on Github? The GIT extension does not support Commits and Pushes. But you can do that via command line.
 
You understood my need exactly.
Would you have any information to send me on how to do this from the command line please?
 
Sure, but I highly recommend to create test repository in GitHub and add a test domain to Plesk to familiarize yourself with the Git command before you use any of these commands on your production site! Because if something goes wrong you might accidently break your website or mess-up your repository.

If you use the build-in Plesk SSH-terminal you use these commands. First get the name of the directory of your repository. In this example it's my-repo.
Schermafbeelding 2024-05-15 183533.png
Replace my-repo with your repository name in the commands bellow. Also I assume your repository has been deployed to the default document root directory (httpdocs). If it isn't change that too in the example bellow.

You probably first have to configure the user identity for your repository. Which you can do using these two commands:
Code:
git --git-dir=git/my-repo.git/ config user.email "[email protected]"
git --git-dir=git/my-repo.git/ config user.name "Your Name"

With the command below you add all new files in to the commit.
Code:
git --git-dir=git/my-repo.git/ --work-tree=httpdocs add --all

Next you commit the changes to repository with a message (replace commit message with your own message) and push the changes your remote repository.
Code:
git --git-dir=git/my-repo.git/ --work-tree=httpdocs commit -am "commit message"
git --git-dir=git/my-repo.git/ --work-tree=httpdocs push
 
Hello, thank you, it’s great, I’m going to try that.
To push to my remote repository, I add the url to this command?

git --git-dir=git/my-repo.git/ --work-tree=httpdocs push remote_repository ?
 
These commands only work if you have previously deployed your remote repository in Plesk. Your remote repository URL will be stored in the repository configuration. So no need to add the URL to any commands.
Schermafbeelding 2024-05-17 192326.png
 
Back
Top