Hello,
I know my question will sound stupid but I'm just getting started with git and I need your help.
I'm currently using Git with Bitbucket and Sourcetree and it's working perfectly.
Now I would like to be able to push my changes directly on the live website instead of pushing to our Bitbucket repo and then add the edited files 1 by 1 throught the FTP ...
I have the SSH credentials for my server and I tried a few stuffs but none are working.
Could anyone help? That would be very nice ![]()
Thanks
SSH to you web server, change into the correct directory, and clone your git repo there. Now you can update the webserver at any time by doing a "git pull" in that directory. This would be the easiest way.
If you prefer to update it by doing a "git push" from your workstation, you should be able to do that as well. Add the webserver as a second remote by using "git remote add webserver <url>". It will take a little more work to get the paths and ports all set up correctly this way, though.
Hello Tim,
Thanks for your help.
How can I do that using Sourcetree ? I tried to log to my server using the command and it works, I tried to clone my repo and it worked as well BUT it creates a folder all the time like http://www.mywebsite.com/myproject while I want it to be in the root.
My goal is to have a working version on my computer where I will work on and then to push the changes on the repo on Bitbucket and on my server.
Thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You can do "git clone <url> ." to clone into the current working directory without creating a subdirectory. In SourceTree, you can add a remote by going to Repository->Repository Settings
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.