How to fix git

Thursday, August 25, 2022 · 1 Min Read

GithubCoding

Accidently made a commit to master/main branch, here’s how to fix it!

git branch backup
git reset HEAD^
git stash
git push origin master –force
git stash pop