$ brew install git-ftp
• FTP (default)         host.example.com[:<port>][/<remote path>]
• FTP                   ftp://host.example.com[:<port>][/<remote path>]
• SFTP                  sftp://host.example.com[:<port>][/<remote path>]
• FTPS                  ftps://host.example.com[:<port>][/<remote path>]
• FTPES                 ftpes://host.example.com[:<port>][/<remote path>]

-h, --help              Shows this help screen.
-u, --user              FTP login name.
-p, --passwd            FTP password.
-k, --keychain          FTP password from KeyChain (Mac OS X only).
-s, --scope             Using a scope (e.g. dev, production, testing).
-D, --dry-run           Dry run: Does not upload anything.
-a, --all               Uploads all files, ignores deployed SHA1 hash.
-c, --commit            Sets SHA1 hash of last deployed commit by option.
-A, --active            Use FTP active mode.
-l, --lock              Enable/Disable remote locking.
-f, --force             Force, does not ask questions.
-n, --silent            Silent mode.
-v, --verbose           Verbose mode.
-vv                     Very verbose or debug mode.
--syncroot              Specifies a directory to sync from as if it were the git project root path.
--insecure              Don't verify server's certificate.
--cacert                Specify a <file> as CA certificate store. Useful when a server has got a self-signed certificate.
--version               Prints version.

初期化(git init)

.git-ftp.log ができる

$ git ftp init -u <user> -p - ftp://host.example.com/public_html

アップロード(git push)

$ git ftp push -u <user> -p - ftp://host.example.com/public_html

.git-ftp.log にHEADのハッシュ値を書き込んでいく

git rev-parse HEADcat .git-ftp.log が同じになるはず

comments powered by Disqus
back to top