tags:

views:

30

answers:

2

Hi,

i've modified several files in a folder and subfolders. I could add the top folder recursively but then i have several subfolders that are untracked, so every time i do the recursive add to stage changes, i have to untrack the subfolders with git rm -r --cached. Is there a better way to just stage the modifications that show up in git status, without tracking already explicitly untracked files?

meta-question: is really a good idea that 'git add' means two (or more) things? in this context, if the command to track files (git add) were not the same used for stage modifications (git add) then i would not have this problem in the first place

A: 

I think what you're looking for is

git commit -a

This will let you commit changes only.

Nigel
+3  A: 

git add -u adds only modifications. Also consider adding files which you don't want to track to .gitignore file.

max