I recently opened a repo on GitHub. I'm new to Git. As usual with newcomers, I committed using the default name and email, which I, in the best noob tradition, discovered five commits too late. Now the fun starts, cause I started to search for info on how to change the author & committer name of these commits. Fine. I basically found the following info and a lot of copies:
How to remove selected commit log entries from a Git repository while keeping their changes?
Change the author and committer name and e-mail of multiple commits in Git
The problem does not seem to be uncommon. I can only say that none of the solutions worked. Half of them are variations of the same git filter-branch -f --env-filter
script. I tried to work on that script multiple times. The problem is that after applying the script, I cannot push. "Fast-forward pushes rejected" or something like that. Fine, the only way to go on is to pull. After pulling, all the old info is there again + a new branch with the new info. I'm already sitting here with four branches, merged in the most egregious ways, all containing the same info with different author names, including the one I wanted to delete.
OK to cut it short, I also tried to delete selected commits, which generates hair-raising conflicts that I am unable to resolve (how???), and to squash some of the commits into newer ones with the correct author information, which results in the current project state being wrecked. Even better, I get a segmentation fault sometimes after executing git rebase -i
, which I'm informed here: http://lists-archives.org/git/729800-rebase-i-segmentation-fault-and-another-problem.html is completely logical. The only thing that (thankfully) works is git rebase --abort
, which saved my ass multiple times.
I hope my frustration does not repel, but instead amuse you and stimulate you to help me. I'd like:
To remove said author info finally
Bonus: To get rid of all the branches containing the same information.
But I'd be happy with the first one too, if the hurdle of deleting past branches without wrecking the current state is too much for a git newcomer. Thanks in advance.