Git-FTP: Efficiently Upload Modified Files with Git to FTP Servers
Git-FTP is an incredibly efficient tool that harnesses the power of Git to selectively upload only the modified files to FTP servers. By intelligently keeping track of uploaded files and accurately identifying the local files that have been changed, it not only saves valuable time but also optimizes bandwidth usage.
It is important to note that Git-FTP is not intended to function as a centralized deployment tool and therefore, it is crucial to ensure that files are left undisturbed throughout the upload process.
Features
- Uploading to FTP servers the Git way is a confident approach.
- This method not only saves time but also reduces bandwidth usage.
- It efficiently keeps track of all the uploaded files.
- With this approach, you can effortlessly deploy another branch or revert to an older version from the Git history for uploading.
- It leverages Git to determine any local file changes, ensuring accuracy in the uploading process.
- For more options, features, and examples, please refer to the comprehensive manual.
How to use?
# 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.
License
GPL-3.0 license