2

今私はこれを行います:

git commit -a -m "comment" 

次に (bitbucket.org へ)

git push 

次に (ftp 経由でホスティングへ)

git ftp push

これらのコマンドを自動的に実行したい:

git fix "comment" 

とか、ぐらい:

gitfix "comment"
4

1 に答える 1

3

bash 関数を作成します。

gitfix() {
  git commit -a -m "$1" && git push && git ftp push
}

それをファイルに入れて~/.bashrc、ターミナルから次のように実行できるようにしますgitfix "some commit comment"

更新: コマンドを && で連結したため、失敗した場合、残りのコマンドは実行されません。この更新についてバーパーに感謝します。

于 2013-11-03T14:28:37.420 に答える