Okay, so I accidentally put the wrong remote URL into one of my git projects and so managed to post a whole bunch of completely wrong commits to a github repository. I need to revert the entire repository back to a specific version, getting rid of everything that was committed after a certain revision.
Is there an easy way to do this, ideally without having to touch my original project?
Note that we’re talking about 6 separate commits here, all of which I need to get rid of completely. This includes getting rid of a whole chunk of files which were committed to the repository and which overwrote the directory that used to be there.
git reset --hard [REVISION] && git push --force