How to Revoke 'git add' Before 'git commit' Command?
Sometimes you need to undo your git file before you git comment command. Because you made a some wrong code and you did git add using "git add ." command then you think how to undo your code before git commit command. But you can do that using git reset command, if you need to undo all file Or you may need to undo just one then you can do using git reset command, you can see bellow command.
You can try following commands:
Command 1: For Specific File
Command 2: For All Files
I hope it can help you
We are Recommending you
- How to Remove File from Git Commit Before Push?
- How to Delete a Branch using Git Command?
- How to Rename Branch Name in Git Command?
- How to Switch Branch using Git Command?
- Github - How to Create New Branch using Git Command?
- How to Clone Github Repository using Command Line?
- How to Ignore Wildcard Files Name in Git using Gitignore?
- How to Ignore Folder in Git using Gitignore?
- How to Ignore File in Git using Gitignore?
- How to Git Ignore Some Files Locally?
- How to add git add remote origin on bitbucket repository ?
- Git - How to Find a Deleted File in Commit History?
- How to Configure Git Username and Email?