Friday 24 June 2016

How do I delete/reset unpushed commits on Git / Bitbucket

Delete the most recent commit, keeping the work you've done:

git reset --soft HEAD~1

Delete the most recent commit, destroying the work you've done:

git reset --hard HEAD~1

No comments:

Post a Comment