1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36
| 安裝 git-ftp.sh > cd ~/Desktop/workspace/git > git clone http://github.com/resmo/git-ftp.git > sudo make install
查看使用的說明 > git ftp help
第一次提交先進行初始化 (init) > git ftp init -u [user] -p - ftp://dev.localhost/path/to/project
之後的提交使使用 (push) 這種方法 > git ftp push -u [user] -p - ftp://dev.localhost/path/to/project
可以使用以下方法進行一個簡單的初始和提交測試 (並不是真實的提交) > git ftp init -u [user] -p --dry-run ftp://dev.localhost/path/to/project > git ftp push -u [user] -p --dry-run ftp://dev.localhost/path/to/project
設定預設的提交資料 > git config git-ftp.user [user] > git config git-ftp.url ftp://dev.localhost/path/to/project > git config git-ftp.password [password]
當設定了預設的提交資料後,便可以省略上面那堆長長的參數 > git ftp push
另外也可以設定一些不是預設的提交資料 > git config git-ftp.dev.user [user] > git config git-ftp.dev.url ftp://dev.localhost/path/to/project > git config git-ftp.dev.password [password]
當要使用上面的額外設定資料,可以通過以下指令 > git ftp push -s dev
查看整個過程 (-v) 和使用主動模式 (-A) > git ftp push -v -A
|