Sometimes git suggests git rm --cached
to unstage a file, sometimes git reset HEAD file
. When should I use which?
EDIT:
D:\
D:\code\gt2>git status
# On branch master
#
# Initial commit
#
# Changes to be committed:
# (use "git rm --cached ..." to unstage)
#
# new file: a
(use "git rm --cached ..." to unstage)
git is a system of pointers
you do not have a commit yet to change your pointer to
the only way to 'take files out of the bucket being pointed to' is to remove files you told git to watch for changes
D:\code\gt2>git commit -m a
[master (root-commit) c271e05] a
0 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 a
git commit -m a
D:\code\gt2>git status
# On branch master
# Changes to be committed:
# (use "git reset HEAD ..." to unstage)
#
# new file: b
#
(use "git reset HEAD ..." to unstage)