how to usee git reset for mergerd branch code example Example: git undo merge git reset --hard HEAD~1