Revert Git Commit which has not been Pushed
- Undo the last commit and keep all files staged: git reset --soft HEAD~
 - Undo the last commit and un-stage all files: git reset HEAD~
 - Undo the last commit and completely remove all changes: git reset --hard HEAD~
 
Undo Pushed Commit
               git revert <commit_hash>
Issue:     There is no tracking information for the current branch.
  Please specify which branch you want to merge with.
Solution: 
              git config --global push.autoSetupRemote true
Comments
Post a Comment