是否可以通过单个内置命令行命令跳过暂存区并(同时)将未跟踪的新文件提交给 git?如果没有,有哪些替代方案?
http://git-scm.com/book/en/Git-Basics-Recording-Changes-to-the-Repository
Providing the -a option to the git commit command makes Git automatically stage every file that is already tracked before doing the commit, letting you skip the git add part:
$ git commit -a -m 'added new benchmarks'
谢谢。
最佳答案
使用单个内置命令行命令?没有。
使用两个命令:
git add -A
git commit
使用自定义别名:
将此添加到 .gitconfig:
[alias]
commituntracked = "!git add -A; git commit"
然后你可以做
git commituntracked
关于git - 是否可以跳过暂存区并(也)将未跟踪的新文件提交给 git?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16068968/