Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
今私はこれを行います:
git commit -a -m "comment"
次に (bitbucket.org へ)
git push
次に (ftp 経由でホスティングへ)
git ftp push
これらのコマンドを自動的に実行したい:
git fix "comment"
とか、ぐらい:
gitfix "comment"
bash 関数を作成します。
gitfix() { git commit -a -m "$1" && git push && git ftp push }
それをファイルに入れて~/.bashrc、ターミナルから次のように実行できるようにしますgitfix "some commit comment"
~/.bashrc
gitfix "some commit comment"
更新: コマンドを && で連結したため、失敗した場合、残りのコマンドは実行されません。この更新についてバーパーに感謝します。