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

20,914

Solution 1

Yes,

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

Or go to commit -> stage to commit

Solution 2

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!

Share:
20,914
baash05
Author by

baash05

Under the hood, we all want to know more. We are here to learn through our life, to be more than when we started out. We joined StackOverflow to learn and to share. Who am I? About me? I am a father of two amazing children: bright happy and filled with energy. I am a husband, of one amazing woman. I say I like to run, but I don't do it, I say I love to code, and I do it almost as often as I can. I used to do WingChun, and in some ways it defines who I turned into. A man who loves simple logic. Low level where and when I can. I like to find the rules and then twist them about, bending but never break them.

Updated on July 09, 2022

Comments

  • baash05
    baash05 almost 2 years

    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.

  • baash05
    baash05 over 14 years
    There are days when my mind seems to be smaller than my butt, but strangely full of the same thing :)
  • Sam Saffron
    Sam Saffron over 14 years
    @baash, no big deal, it took me a while to find that setting its kind of hidden, I was expecting right click to work.
  • Rachel McMahan
    Rachel McMahan almost 13 years
    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.
  • Brad
    Brad over 12 years
    I agree "Stage to Commit" is not indicative of the operation it is about to perform. It should be called "Unstaged to Staged"
  • testing123
    testing123 over 11 years
    Bless you for answering this. Saved me lots of clicking misery!
  • Josh O'Brien
    Josh O'Brien over 8 years
    @Brad Or perhaps "Stage in order to Commit"
  • MetaSnarf
    MetaSnarf about 3 years
    is there a way to add multiple commands on a single name?
  • ntjess
    ntjess about 3 years
    @MetaSnarf 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"