Undo git add
How to undo/remove file after 'git add'
Lets say you mistakenly added a file using the following command.
1
git add abc.txt
Copied!
To undo adding run the following.
1
git reset HEAD abc.txt
Copied!
Dont do git reset, you will loose changes
1
git reset abc.txt < ---- DONT DO THIS
Copied!
Last modified 5mo ago
Copy link