Delete the most recent commit Keeping the work you've done $ git reset --soft HEAD~1 Destroying the work you've done $ git reset --hard HEAD~1
Updating a feature branch $ git checkout master $ git pull $ git merge origin/master $ git checkout <feature-branch> $ git merge master $ git push