1

git status gives me:

a list of added files

a list of modified files

a list of removed files


What I know:

git add -A --> all 3 lists

git add . ---> all 3 lists

git add --ignore-removal . ---> new and mod only

git add -u --> mod and deleted

Question:

git add -?? --> new only

git add -?? --> deleted only

git add -?? --> new and deleted only

hello_harry
  • 1,265
  • 2
  • 14
  • 24
  • 1
    No there is no direct way to do this with a single command. You'll have to do a little customer work: http://stackoverflow.com/questions/15761890/git-add-only-all-new-files-not-modified-files – Thomas Stringer Oct 09 '15 at 15:58
  • Possible duplicate of [git: stage only new files](http://stackoverflow.com/questions/3707116/git-stage-only-new-files) – sschuberth Oct 12 '15 at 06:38
  • To amend to that, `git ls-files` in addition to `-o` also supports `-d` (and more), so that should get you going. – sschuberth Oct 12 '15 at 06:40

0 Answers0