I want to upload (using only ftp) to my server only changes. I have a working git repository in my local. But I cant figure out any way to push using ftp.
I can use
You should be able to push to a FTP repository using
git push ftp://host.net/path/to/repo.git/
I’ve written a little PHP script that heps with that. 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:
phploy
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:
phploy --server staging
There is more that can be done – check it out on Github: https://github.com/banago/PHPloy
The git-ftp script does exactly this:
git-ftp by René Moser is a simple shell script for doing FTP the Git way. Use git-ftp.sh to upload only the Git tracked files to a FTP server, which have changed since the last upload. This saves time and bandwith. Even if you play with different branches, git-ftp.sh knows which files are different. No ordinary FTP client can do that.