How can I combine these git commands?

后端 未结 4 871
孤街浪徒
孤街浪徒 2021-02-09 22:43

I do the following string of commands for git and my fingers are getting tired of typing them. :)

git add .
git commit -m \'Some message\'
git push
cap deploy
         


        
4条回答
  •  孤街浪徒
    2021-02-09 23:15

    This is not an answer to your question (my answer would be: make a bash/batch script).

    I say this: Don't do git add . This will add every change and all untracked files in the current directory and it's descendants. You might not want these untracked files in your directory and you'll accidently add them, especially if you're typing ti as much as you claim you are.

    Instead do git add -u. Even better, skip the add stage and do git commit -a -m"blah", which saves you an entire line, which is apparently something you are keen to avoid.

提交回复
热议问题