如何在 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
How do I stage all files at once in Git 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.
很晚了,但一种方法是在“工具”菜单中添加一个选项。
- Click 'Tools'>Add...
- Name it whatever you want (I chose 'add all')
- In the 'Command' field, type
git add *
- Optionally check the boxes to remove a dialog window, output window, and global configuration.
- Click the
Add
button in the bottom right.
- 单击“工具”>“添加...”
- 随意命名(我选择了“全部添加”)
- 在“命令”字段中,键入
git add *
- (可选)选中复选框以删除对话窗口、输出窗口和全局配置。
- 点击
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。