Quantcast
Channel: How do I delete a commit from a branch? - Stack Overflow
Viewing all articles
Browse latest Browse all 80

Answer by thestar for Delete commits from a branch in Git

$
0
0

To delete in local branch, use

git reset --hard HEAD~1

To delete in a remote branch, use

git push origin HEAD --force

Viewing all articles
Browse latest Browse all 80

Trending Articles