No description
  • Shell 74.5%
  • HTML 13.1%
  • Roff 9.8%
  • CSS 2.1%
  • Makefile 0.4%
Find a file
2026-02-11 15:57:19 +11:00
.github Add label needs_testing to stale exempt list 2019-12-01 13:06:05 +01:00
man add option password-command 2026-01-01 22:32:53 +01:00
tests Use grep -E instead of egrep 2026-02-09 16:18:54 +01:00
.codeclimate.yml Add Codeclimate configuration file 2016-03-25 21:54:02 +11:00
.editorconfig add .editorconfig 2026-01-01 20:07:34 +01:00
.gitignore Optimise test FTP server config 2016-12-01 11:48:42 +11:00
.travis.yml Try travis buuild matrix feature to install lftp. 2019-05-17 14:52:08 +02:00
AUTHORS Update AUTHORS 2022-11-18 16:54:45 +08:00
CHANGELOG.md Version 1.6.0 2020-02-03 18:26:17 +11:00
git-ftp Use grep -E instead of egrep 2026-02-09 16:18:54 +01:00
INSTALL.md Doc: Add installation instructions for direct download 2019-06-24 20:03:21 +02:00
issue_template.md Create an issue template 2017-05-31 16:21:49 +10:00
LICENSE Added license and readme 2010-02-06 21:58:44 +01:00
Makefile Makefiles: allow custom bindir and mandir 2015-08-02 13:35:01 -07:00
README.md Added link to ftp-deploy github action 2020-05-01 22:46:50 -05:00

Git-ftp -- uploads to FTP servers the Git way

If you use Git and you need to upload your files to an FTP server, Git-ftp can save you some time and bandwidth by uploading only those files that changed since the last upload.

It keeps track of the uploaded files by storing the commit id in a log file on the server. It uses Git to determine which local files have changed.

You can easily deploy another branch or go back in the Git history to upload an older version.

# Setup
git config git-ftp.url "ftp://ftp.example.net:21/public_html"
git config git-ftp.user "ftp-user"
git config git-ftp.password "secr3t"

# Upload all files
git ftp init

# Or if the files are already there
git ftp catchup

# Work and deploy
echo "new content" >> index.txt
git commit index.txt -m "Add new content"
git ftp push
# 1 file to sync:
# [1 of 1] Buffered for upload 'index.txt'.
# Uploading ...
# Last deployment changed to ded01b27e5c785fb251150805308d3d0f8117387.

If you encounter any problems, add the -v or -vv option to see more output. The manual may answer some of your questions as well.

Further Reading

Limitations

  • Windows and OS X: I am very limited in testing on Windows and OS X. Thanks for helping me out fixing bugs on these platforms.
  • git-ftp as deployment tool: git-ftp was not designed as centralized deployment tool. While a commit is being pushed and uploaded to the FTP server, all files belonging to that revision must remain untouched until git-ftp has successfully finished the upload. Otherwise, the contents of the uploaded file will not match the contents of the file referenced in the commit.

Contributions

Don't hesitate to improve this tool. Don't forget to add yourself to the AUTHORS file. The core functionality is unit tested using shunit2. You can find the tests in tests/.

This application is licensed under GNU General Public License, Version 3.0