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.
How do I stage all files at once in Git Gui?
Yes,
Select the items (select top one hit shift, select bottom one) and hit CTRL T
Or go to commit -> stage to commit
There are days when my mind seems to be smaller than my butt, but strangely full of the same thing :) –
Byrann
@baash, no big deal, it took me a while to find that setting its kind of hidden, I was expecting right click to work. –
Skyway
Ah. Thanks a lot. The operation "Stage to Commit" (Ctrl+T) wasn't informative for me. I thought it meant take whatever's listed under Staged Changes and commit them. –
Billybillycock
I agree "Stage to Commit" is not indicative of the operation it is about to perform. It should be called "Unstaged to Staged" –
Tilford
Bless you for answering this. Saved me lots of clicking misery! –
Ferricyanide
@Tilford Or perhaps "Stage in order to Commit" –
Botanomancy
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.
Now, click Tools>Add all and all changes will be staged. Hope this helps!
is there a way to add multiple commands on a single name? –
Affirmatory
@Affirmatory Indeed, bash syntax can be used to merge multiple commands. So
&&
can be placed between each command, where each next command only runs if the previous succeeds. Example: git add . && git commit -m "test commit"
will both stage and commit your current changes with the message "test commit" –
Edelmiraedelson © 2022 - 2024 — McMap. All rights reserved.