You are here

git-ftp

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

ACTIONS

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.

catchup : Creates or updates the .git-ftp.log file on the remote host. It assumes that you uploaded all other files already. You might have done that with another program.

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

download (EXPERIMENTAL) : Downloads changes from the remote host into your working tree. This feature needs lftp to be installed and does not use any power of Git. WARNING: It can delete local untracked files that are not listed in your .git-ftp-ignore file.

pull (EXPERIMENTAL) : Downloads changes from the remote host into a separate commit and merges that into your current branch. This feature needs lftp to be installed.

snapshot (EXPERIMENTAL) : Downloads files into a new Git repository. Takes an additional argument as local destination directory. Example: `git-ftp snapshot ftp://example.com/public_html projects/example` This feature needs lftp to be installed.

show : Downloads last uploaded SHA1 from log and hooks `git show`.

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

add-scope : Creates a new scope (e.g. dev, production, testing, foobar). This is a wrapper action over git-config. See SCOPES section for more information.

remove-scope : Remove a scope.

help : Shows a help screen.

code type: 
Taken from: 
https://github.com/git-ftp/git-ftp