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

Share Me
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  

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 code chef

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

View all posts by code chef →