How to revoke ‘git add’ before ‘git commit’ ?

revoke 'git add' before 'git commit'

Today now in this blog how to revoke ‘git add’ before ‘git commit’. Sometimes we need to undo our git file before we git comment command. Because sometimes we made a some mistake or wrong code and we did git add by using “git add .” command then we think how to undo our code before the git commit command. But we can do that by using git reset command, if we need to undo all file Or we may need to undo just a one then we can do that by using git reset command, we can see bellow command.

Example:

// For Spesific file
git reset 
// For all files
git reset

Read Also : Laravel and AngularJS CRUD with Search & Pagination Example

Thanks for read. I hope it help you. For more you can follow us on facebook.

About Md. Mostofa Kamal

My name is Md. Mostofa Kamal. I'm a developer. I live in Bangladesh and I love to write tutorials and tips that will help other developers. I am a big fan of PHP, Javascript, JQuery, Laravel, Codeigniter, VueJS, AngularJS, and Bootstrap from the early stage.

View all posts by Md. Mostofa Kamal →