Sublime Forum

Git add -u, stage all tracked files

#1

Is there an equivalent of git add -u ?

I usually only want to work on the files that I already added into git and thus have a middle ground between “stage every tracked and modified file manually” and “stage all”.

Thanks!

0 Likes

#2

Pressing Ctrl+Shift+A (Cmd+Shift+A on Mac) will run git add -u if there are are modified files, and if not it’ll run git add -A

In other words, press once to stage all modified files, and a second time to stage the rest of the files.

It’s a nice behavior, but I haven’t found a way to make it obvious in the UI yet

4 Likes

#3

that’s very good to know and maybe other people can discover it here as well now,

I just did not try the stage all at all because I thought it would actually stage all and behave like git add -A, maybe I should. have been more curious just.

I tried holding down the alt key, expecting that stage-all would maybe change to stage-tracked or something like that, and I tried the command pallet which only showed “stage all” and the corresponding shortcut and did not have an entry for “stage tracked” so those are the two ideas I’d have.

thanks

0 Likes