git-ftp: working with git in shared servers

git-ftp is an opensource project that uploads via ftp all changes you push in git.

“I use git-ftp for my script based projects, mostly PHP. Most of the low-cost web hosting companies do not provide SSH or git support, but only FTP.”


The most easiest way to install git-ftp (in OSX) is via Macports.

For those unfamiliar with macports, i must to say that is the equivalent of apt-get in linux and one of its main advantages, besides being fast, is the fact it install the necessary dependencies automatically.

$ sudo port selfupdate
$ port install git-ftp

Also, if you prefeer, you can do it via brew:

$ brew install git-ftp

For more installation ways, checkout the git-ftp installation guide.


The first thing you must to do is configure the ftp account in your git repo, something like:

$ git config git-ftp.user username
$ git config git-ftp.url
$ git config git-ftp.password y0ur'p45w0rd
$ git config git-ftp.syncroot path/dir


Now you can push to your shared server, that simple:

$ git ftp push

There are many options such scopes or ignore files. Check out the full documention of the project. Contribute to the project in github.


2 thoughts on “git-ftp: working with git in shared servers

  1. I’ve also written a little PHP script that that does deployments through FTP, but it relatively easier to configure and use then git-ftp. It si called PHPloy and is tightly-coupled with Git to determine what which files where edited/added/deleted and uploads them accordingly. You put your FTP details in a deploy.ini file and run just a command to deploy:

    <code class="bash">phploy</code>

    You can also deploy to multiple servers at once. And if you have multiple servers configured, you can select to deploy to one of them like this:

     <code class="bash">phploy --server staging</code>

    There is more that can be done – check it out on Github:

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s