如何在不单击每个文件的情况下使用 git gui 提交许多新文件?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/2608869/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How can I commit many new files with git gui without clicking each of it?
提问by user94154
I have a ton of new files to commit. Clicking each one in git gui (Windows) to stage is annoying.
我有大量的新文件要提交。在 git gui (Windows) 中点击每一个来登台很烦人。
How can I can I commit a whole bunch of files at once?
我怎样才能一次提交一大堆文件?
回答by nulltoken
A nice answer from @Sam Saffronto a similar questionstates
@Sam Saffron对类似问题的一个很好的回答指出
Select the items (select top one, hit shift, select bottom one) and hit CTRL T
Or go to commit -> stage to commit
选择项目(选择顶部的一项,点击 shift,选择底部的一项)并点击 CTRL T
或者去 commit -> stage to commit
回答by tanascius
Don't use the gui ^^ ... a git add .
will add all new files to the index.
不要使用 gui ^^ ... agit add .
会将所有新文件添加到索引中。
回答by Matt Ellen
I think if you high light them all and type ctrl+t, then you should stage all the selected files, although I find one normally gets left over for some unknown reason.
我认为如果您将它们全部高亮并键入 ctrl+t,那么您应该暂存所有选定的文件,尽管我发现通常会由于某种未知原因而遗留下来。
回答by Paddy
You could have a look at GIT Extensionsfor a different GUI - I find it pretty easy to use.
您可以查看不同 GUI 的GIT 扩展- 我发现它很容易使用。
回答by Jonathan Mayhak
assuming you have cygwininstalled, you can type git commit -m 'whatever'
after you have added the changes to the staging area. To do a mass add do the following: git add .
假设您安装了cygwin,您可以git commit -m 'whatever'
在将更改添加到暂存区后键入。要进行批量添加,请执行以下操作:git add .
this is, of course, done in the command prompt
当然,这是在命令提示符下完成的
回答by yurislav
In Git Gui, You can stage all files at once with menu option:
在 Git Gui 中,您可以使用菜单选项一次暂存所有文件:
commit
> Stage changed files to commit
commit
> Stage changed files to commit
or shortcut ctrl+ i
或快捷方式ctrl+i