Git

How do you discard local commits?

Difficulty: unrated

Source: bregman-arie/devops-exercises by Arie Bregman

Answer

git reset HEAD~1 for removing last commit If you would like to also discard the changes you `git reset --hard``