Git add and commit in one command

后端 未结 27 2380
旧巷少年郎
旧巷少年郎 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:42

    To keep it in one line use:

    git add . && git commit -am "comment"
    

    This line will add and commit all changed and added files to repository.

提交回复
热议问题