by mistake run git reset -hard code example Example: git reset --hard one step git reset --hard HEAD~1