是否有可能跳过暂存区域并(也)将未跟踪的新文件提交给git? [英] Is it possible to skip the staging area and (also) commit untracked, new files to git?
问题描述
是否有可能跳过暂存区域和(也)提交未跟踪的新文件以在单个内置命令行命令中混用?如果不是,有什么选择?
http://git-scm.com/book/en/Git-Basics-Recording-Changes-to-the-Repository
为git commit命令提供-a选项可以让Git
自动为每个已经被跟踪的文件分配
commit,让您跳过git add部分:
$ git commit -a -m'添加了新基准'
谢谢。
这对于大师来说可能看起来相当微不足道, (我承认) - 至少我现在第一次使用它,它可以工作(没有自定义别名):只需使用分号 Is it possible to skip the staging area and (also) commit untracked, new files to git in a single built-in, command-line command ? If not, what are the alternatives ? 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: Thanks. This might seem quite trivial for the gurus, but is a minor revelation to me (I admit) - at least I just used it for the first time now and it works (without custom aliases): Just use a semicolon 这篇关于是否有可能跳过暂存区域并(也)将未跟踪的新文件提交给git?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!; code>,它可以作为一个单行程序:
git add --all; git commit -m一些提示信息
$ git commit -a -m 'added new benchmarks'
;
and it'll work as a one-liner:git add --all; git commit -m "some informative commit message"