Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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.

like image 288
baash05 Avatar asked Aug 28 '09 03:08

baash05


People also ask

How do I stage all changes in git?

So the command to stage all changes for git is git add -A .

How do I Unstage all files in git gui?

Ctrl+T/Ctrl+U: Stage/unstage selected file. Ctrl+I: Stage all files (asks if you want to add new files if there are any) Ctrl+J: Revert changes.


2 Answers

Yes,

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

Or go to commit -> stage to commit

like image 155
Sam Saffron Avatar answered Oct 06 '22 05:10

Sam Saffron


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 Add button in the bottom right.

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

like image 28
ntjess Avatar answered Oct 06 '22 04:10

ntjess