Git Throw Away Local Commits
Git Throw Away Local Commits . If your excess commits are only visible to you, you can just do. To erase your latest local commit use the following: Use of Git Reset, Git Revert, Git Checkout & Squash Commit by Ameet from medium.com And if you actually want to completely undo it, throwing away all uncommitted changes, resetting. The head^ parameter tells git to reset the branch to the last commit. This will remove commits and discard changes as well.) head is now at 62a271561 commit message * second step would be a force pushing git repository to the remote repository.