git add, commit and push commands in one?

前端 未结 30 1497
隐瞒了意图╮
隐瞒了意图╮ 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 04:12

    If the file is already being tracked then you do not need to run git add, you can simply write git commit -am 'your message'

    If you do not want to write a commit message you might consider doing something like

    git commit --allow-empty-message -am ''

提交回复
热议问题