git add, commit and push commands in one?

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

    Set as an alias in bash:

    $ alias lazygit="git add .; git commit -a -m '...'; git push;";
    

    Call it:

    $ lazygit
    

    (To make this alias permanent, you'd have to include it in your .bashrc or .bash_profile)

提交回复
热议问题