Friday, May 20, 2022

How do I undo 'git add' before commit?

How do I undo 'git add' before commit?
I mistakenly added files to Git using the command:
git add myfile.txt
You can undo git add before commit with
git reset <file>
You can use
git reset
without any file name to unstage all due changes.

No comments:

Post a Comment