Git Remove Last Commit from Local Example
Git is distributed version control system that is a awesome. when ever you are working with git repository. if you did commit your code in your local system by mistake, then if you want to remove last commit from your project. so let's see following example:
git add .
git commit -m "change for test"
git reset --soft HEAD~
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 Generate and Add SSH Key in Github?
- How to Configure Git Username and Email?
- Git Remove Last Commit from Local Example