git add, commit and push commands in one?

前端 未结 30 1438
隐瞒了意图╮
隐瞒了意图╮ 2020-12-02 03:15

Is there any way to use these three commands in one?

git add .
git commit -a -m \"commit\" (do not need commit message either)
git push

Som

30条回答
  •  春和景丽
    2020-12-02 03:57

    Simpliest solution would be to:

    git commit -a -m "commit" && git push
    

    git add is already contained in -a parameter of commit, but if you want you can connect them all:

    git add . && git commit -a -m "commit" && git push
    

提交回复
热议问题