0

say I wanted to un-stage all these files. Is there a single command to do so?

hend0825@csel-apollo:/home/hend0825/3081_s20/repo-hend0825/project/src $ git add -A
hend0825@csel-apollo:/home/hend0825/3081_s20/repo-hend0825/project/src $ git status                                                                                                                                                          On branch pause/resume
Your branch is up to date with 'origin/pause/resume'.
Changes to be committed:
(use "git reset HEAD <file>..." to unstage)
modified:   ../../exercises/ex02_inheritance/composed.h
modified:   ../../exercises/ex02_inheritance/derived.h
new file:   ../../exercises/ex02_inheritance/inherit
new file:   ../../exercises/ex02_inheritance/inherit.h
modified:   ../../exercises/ex02_inheritance/main.cc
new file:   ../../exercises/ex02_inheritance/main.o
modified:   ../drivers/bus_driver.cc
modified:   ../drivers/route_driver.cc
new file:   #bus.cc#
modified:   bus.cc
modified:   bus.h
new file:   ../tests/.gitignore
new file:   ../tests/.route_UT.cc.swp
new file:   ../tests/bus_UT.cc~
new file:   ../tests/route_UT.cc~
modified:   ../web_code/web/main.cpp
modified:   ../web_code/web/my_web_server_command.cc
modified:   ../web_code/web/my_web_server_command.h
modified:   ../web_code/web/visualization_simulator.cc
modified:   ../web_code/web/visualization_simulator.h
modified:   ../web_graphics/sketch.js
Arkadiusz Drabczyk
  • 11,227
  • 2
  • 25
  • 38
  • Does this answer your question? [How do I undo 'git add' before commit?](https://stackoverflow.com/questions/348170/how-do-i-undo-git-add-before-commit) – phd Mar 17 '20 at 11:44
  • https://stackoverflow.com/search?q=%5Bgit%5D+unstage+all+files – phd Mar 17 '20 at 11:44

1 Answers1

0

<file> is optional:

 git reset HEAD
Arkadiusz Drabczyk
  • 11,227
  • 2
  • 25
  • 38