Commit and automatically add all untracked files

后端 未结 5 1878
南方客
南方客 2020-12-23 09:07

I often forgot that I have some new files and directly do,

git commit -a -m \"My commit message\"

This only commits changed files, and I ha

5条回答
  •  轮回少年
    2020-12-23 09:25

    Yeah, I had the same problem like you in the past. I preferred to use git command, but I got a big troubles because the guard in rails changed many files without alert :)

    So now, whenever i commit new code, I try to use the UI to do this (git gui) and keep in mind never use git commit -a because you don't sure which files were modified! After rebase new code, please you gitk to view the git tree, so you can know the lasted commitment, committers, commit files and so on.

提交回复
热议问题