现在我这样做:
git commit -a -m "comment"
然后(到bitbucket.org)
git push
然后(通过FTP托pipe)
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"
更新 :用&&连接命令,所以如果失败,其余的命令将不会被执行。 感谢此更新的burper 。