2

I accidentally ran 'git add -A'

I haven't run a commit since adding those files and I'd like to undo this command.

I realize that I could manually remove files with

git rm --cached <path_to_file>

However several files have been added since and it would be a lot easier to do something like

git rm --cached <path_to_file> -A  

1 Answer 1

3

Just reset to HEAD will undo it:

git reset HEAD

Not the answer you're looking for? Browse other questions tagged or ask your own question.