我正在使用mac osx,并希望制作一个简单的bash脚本,用于将更改的文件上传到我的github存储库.
它应该询问我对我提交的文件的评论:
git add . git commit -m 'prompt for comments' git push origin master
我不知道如何编写脚本,我只想通过终端使用单个命令来完成.
任何帮助将非常感激.
我知道如何在我的.bash_profiles中制作别名:-)
谢谢.
你可以尝试:
#!/bin/bash git add . read -p "Commit description: " desc git commit -m "$desc" git push origin master