My github has 100 commits in it right now. I need to rollback the repository to commit 80, and remove all the subsequent ones.
Why? This repo is supposed to be fo
Another way:
Checkout the branch you want to revert, then reset your local working copy back to the commit that you want to be the latest one on the remote server (everything after it will go bye-bye). To do this, in SourceTree, I right-clicked on the and selected "Reset BRANCHNAME to this commit".
Then navigate to your repository's local directory and run this command:
git -c diff.mnemonicprefix=false -c core.quotepath=false push -v -f -- tags REPOSITORY_NAME BRANCHNAME:BRANCHNAME
This will erase all commits after the current one in your local repository but only for that one branch.