git-ftp.sh: Pushing changed files to a website via FTP
I scripted a small but useful shell tool named git-ftp.sh licensed under GPL v3 helps you saving time while pushing changed files to a ftp server. It uses git to find out which files have been changed since the last upload.
If you have multiple branches, which is very common with git, it also finds changed files between those branches. It also deletes files on ftp server which were deleted in the local git repo. It does only upload and delete git tracked files.
Some more features:
- Option -D: dry-run, so you can see what would happen
- Option -a: Forces to upload all files
- Option -i: Enter the FTP password interactively
- Shows a warning if you are not on master branch
Let’s have a look at git-ftp.sh in action: