Reverting a Commit in GitHub
How to revert a commit and force push in a local repository to remove commit history.
The commit history will also be deleted.
1
2
git reset --hard <commit id>
git push -f origin main
How to revert a commit and force push in a local repository to remove commit history.
The commit history will also be deleted.
1
2
git reset --hard <commit id>
git push -f origin main
A new version of content is available.