How do I undo 'git add' before commit?
Asked 07 September, 2021
Viewed 2.5K times
git
  • 55
Votes

I mistakenly added files to Git using the command:

git add myfile.txt

I have not yet run git commit. Is there a way to undo this, so these files won't be included in the commit?

git

30 Answer