• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

git-ftp/git-ftp: Uses Git to upload only changed files to FTP servers.

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称:

git-ftp/git-ftp

开源软件地址:

https://github.com/git-ftp/git-ftp

开源编程语言:

Shell 74.2%

开源软件介绍:

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

Copyright

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




鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
truenas/middleware: TrueNAS CORE/Enterprise/SCALE Middleware Git Repository发布时间:2022-06-11
下一篇:
schacon/gitbook: Git Community Book Source发布时间:2022-06-11
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap