git_ftp reference guide

Git-ftp is an FTP client using Git to determine which local files to upload or which files to delete on the remote host. For more information, see the git_ftp manual:


git ftp <action>[<options>][<url>]


Some of the common options are listed here:

  • init : Uploads all git-tracked non-ignored files to the remote server and creates the .git-ftp.log file containing the SHA1 of the latest commit.

  • push : Uploads files that have changed and deletes files that have been deleted since the last upload.

  • log : Downloads last uploaded SHA1 from log and hooks git log.

  • help : Shows the help screen.


  • -u [username], --user [username] : FTP login name. If no argument is given, local user will be taken.

  • -p [password], --passwd [password] : FTP password. See -P for interactive password prompt. (note)

  • -P, --ask-passwd : Ask for FTP password interactively.

  • -a, --all : Uploads all files of current Git checkout.

  • -c, --commit : Sets SHA1 hash of last deployed commit by option.

  • -A, --active : Uses FTP active mode. This works only if you have either no firewall and a direct connection to the server or an FTP aware firewall. If you don’t know what it means, you probably won’t need it.

  • -b [branch], --branch [branch] : Push a specific branch

  • -h, --help : Prints some usage information.

  • -v, --verbose : Be verbose.

  • -vv : Be as verbose as possible. Useful for debug information.

  • --insecure : Don’t verify server’s certificate.

  • --cacert <file> : Use as CA certificate store. Useful when a server has a self-signed certificate.

  • --disable-epsv : Tell curl to disable the use of the EPSV command when doing passive FTP transfers. Curl will normally always first attempt to use EPSV before PASV, but with this option, it will not try using EPSV.

  • --auto-init : Automatically run init action when running push action



For example

Supported Protocols are:

  • ftp://... : FTP (default if no protocol is set)

  • sftp://... : SFTP

  • ftps://... : FTPS

  • ftpes://... : FTP over explicit SSL (FTPES) protocol