How TO Remove Last Commit From Local In Git ?

Remove Last Commit From Local In Git

Today now in this post i will show you how to remove last commit from git on locally. We know that git is distributed version and control system that is a awesome. when ever we are working with git repository. From here you will know about How to Remove Last Commit From Local In Git? If we did commit our any code in our local system by mistake, then also if we want to remove last commit from our project. so let’s see the following example for remove:

Example:

git add .
git commit -m "change for test"
git reset --soft HEAD~

Read Also : How to remove specific value from php array?

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 →