NOTE: Run all commands from your projects root directory
#onetime
sudo apt-get install git-ftp
#onetime NOTE: PLEASE CHANGE WITH YOUR FTP SERVER URL
git config git-ftp.url "ftpupload.net"
#onetime NOTE: PLEASE CHANGE WITH YOUR FTP USERNAME
git config git-ftp.user "ftp-username"
#onetime NOTE: PLEASE CHANGE WITH YOUR FTP PASSWORD
git config git-ftp.password "ftp-password"
#onetime
git config git-ftp.syncroot .
#onetime
git ftp init --remote-root htdocs
git ftp push --remote-root htdocs
if you want to ignore files then create .git-ftp-ignore and add entries in this file
Ref:
https://www.zyxware.com/articles/4192/how-to-deploy-files-from-a-git-repository-via-ftp
https://github.com/git-ftp/git-ftp
https://zoomadmin.com/HowToInstall/UbuntuPackage/git-ftp
https://github.com/git-ftp/git-ftp/blob/master/INSTALL.md#debian-ubuntu-and-others-using-apt
https://github.com/git-ftp/git-ftp/blob/master/man/git-ftp.1.md
content of this website is awesome, and it would be great if you provide the brief description of the command! just a suggestion 🙂 it will help us to understand better.