Git add and commit in one command

后端 未结 27 2424
旧巷少年郎
旧巷少年郎 2020-11-28 00:28

Is there any way I can do

git add -A
git commit -m \"commit message\"

in one command?

I seem to be doing those two commands a lot,

27条回答
  •  我在风中等你
    2020-11-28 00:40

    I use this git alias:

    git config --global alias.cam '!git commit -a -m '

    So, instead of call

    git add -A && git commit -m "this is a great commit"

    I just do:

    git cam "this is a great commit"

提交回复
热议问题