I’m using Git GUI on windows. My projects lie on an external linux server like this:
/home/site_dev
/home/site_prod
When editing the PHP, JS and CSS files, I simply use a text editor which supports FTP open/save.
How can I use Git to manage my projects? The “Create New Repository” only allows me to chose local file locations.
The best way to work on the project is to clone the project to a local directory, work, commit, and then deploy and/or push to the server.
Cloning can be done from a FTP, just do:
And it will clone the project to a new directory inside your current one.
Once changes are committed, just
git push originto propagate changes back to the server.Check this post for discussion on git remote repositories on a ftp server.
EDIT
If you want to do everything remotely, your best bet is to mount the FTP location as a network drive, and provide it to git interface. See this article for solutions. There may be some hicups though, due to limitations of the FTP protocol. It maybe worth sharing your files with Samba if you meet problems with FTP.