git-ftp

Uses Git to upload only changed files to FTP servers.

Github星跟踪图

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 centralised
    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.
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

主要指标

概览
名称与所有者git-ftp/git-ftp
主编程语言Shell
编程语言Makefile (语言数: 6)
平台
许可证GNU General Public License v3.0
所有者活动
创建于2013-04-17 06:54:46
推送于2024-10-20 16:29:50
最后一次提交2024-10-20 18:29:50
发布数47
最新版本名称1.6.0 (发布于 )
第一版名称0.0.5 (发布于 2010-04-01 00:03:42)
用户参与
星数5.5k
关注者数146
派生数697
提交数1.1k
已启用问题?
问题数498
打开的问题数106
拉请求数123
打开的拉请求数17
关闭的拉请求数33
项目设置
已启用Wiki?
已存档?
是复刻?
已锁定?
是镜像?
是私有?