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"
更新:用 && 连接命令,因此,如果失败,将不会执行剩余的命令。感谢burper的这次更新。