When I first started out with this repo, I hadn’t used git before and biffed the setup by mistyping my email or something so all commits for a while were made by the user “unknown.” I found an answer on here to convert all the “unknown” commits to my name but what it actually did was duplicate the commit and apply my name. So now I have all these “unknown” user commits scattered.
So I was wondering about some commands to run to delete all commits by “unknown” user.
You will have to make use of
git filter-branchin your repo and force push it to Github.Here’s an example from the official docs that deals almost with the same situation where you want to remove commits by a particular user:
Note that this will rewrite your history and it might affect others who also use your repo. Some advice from Github:
http://help.github.com/remove-sensitive-data/