1

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.

CharlesB
  • 86,532
  • 28
  • 194
  • 218
mrbay
  • 101
  • 1
  • 2
  • 8

1 Answers1

0

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:

git clone ftp://user@server/project.git

And it will clone the project to a new directory inside your current one.

Once changes are committed, just git push origin to 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.

Community
  • 1
  • 1
CharlesB
  • 86,532
  • 28
  • 194
  • 218
  • But I do not want to work on the files locally. I edit the files directly on the remote server. – mrbay May 07 '12 at 10:49