如何在 Git Gui 中一次暂存所有文件?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/1344908/
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

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-19 03:48:39  来源:igfitidea点击:

How do I stage all files at once in Git Gui?

gitstaginggit-gui

提问by baash05

I have just created a GIT on a folder. I now want to add the contents of that folder by "staging" all the files. In the GUI, is there a way to select all the files. I have well over 4000 files and clicking one at a time is proving to be a bit of a pain.

我刚刚在文件夹上创建了一个 GIT。我现在想通过“暂存”所有文件来添加该文件夹的内容。在 GUI 中,有没有办法选择所有文件。我有超过 4000 个文件,一次单击一个文件被证明是有点痛苦。

回答by Sam Saffron

Yes,

是的

Select the items (select top one hit shift, select bottom one) and hit CTRL T

选择项目(选择顶部的一个点击移位,选择底部的一个)并点击 CTRL T

Or go to commit -> stage to commit

或者去 commit -> stage to commit

回答by ntjess

Quite late, but one method is to add an option in the 'Tools' menu.

很晚了,但一种方法是在“工具”菜单中添加一个选项。

  1. Click 'Tools'>Add...
  2. Name it whatever you want (I chose 'add all')
  3. In the 'Command' field, type git add *
  4. Optionally check the boxes to remove a dialog window, output window, and global configuration.
  5. Click the Addbutton in the bottom right.
  1. 单击“工具”>“添加...”
  2. 随意命名(我选择了“全部添加”)
  3. 在“命令”字段中,键入 git add *
  4. (可选)选中复选框以删除对话窗口、输出窗口和全局配置。
  5. 点击Add右下角的按钮。

Now, click Tools>Add all and all changes will be staged. Hope this helps!

现在,单击工具>全部添加,所有更改都将暂存。希望这可以帮助!

回答by Vince

git add *

or just

要不就

git commit -a -m "your message"

Don't mess around with the GUI.

不要乱用 GUI。