Let's say I have a large project with a large team and a fast pace of committing. I write some code, make a commit, and push that commit to origin.
Then I decided I no longer want that commit. If I were to
git reset --hard HEAD~1
or something similar, my history goes back, and GitHub keeps insisting on making me run a pull, since my local is now behind GitHub.
Instead, what I want to do is go back a commit, but have the history appear as though I made the original commit, and then made another commit afterwards, but the second commit is actually just the removal of the code in the first. That way other team members can pull at any time without the history getting screwed up.
How can I achieve this?