Git – Undo git add

If you want to undo the git add action on your project. Use the following 2 commands.

Revert the add action to all files
git reset
Revert the add action to a specific file
git reset [filename]

Done =)

Reference: StackOverflow – Undo ‘git add’ before commit

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.