Note that there are some explanatory texts on larger screens.

plurals
  1. POChange author name of previous commits: Fast-forward pushes rejected
    primarykey
    data
    text
    <p>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 &amp; committer name of these commits. Fine. I basically found the following info and a lot of copies: </p> <ol> <li><p><a href="http://help.github.com/change-author-info/" rel="nofollow noreferrer">http://help.github.com/change-author-info/</a></p></li> <li><p><a href="https://stackoverflow.com/questions/1338728/how-to-delete-a-git-commit">Delete commits from a branch in Git</a></p></li> <li><p><a href="https://stackoverflow.com/questions/495345/git-removing-selected-commits-from-repository">How to remove selected commit log entries from a Git repository while keeping their changes?</a></p></li> <li><p><a href="https://stackoverflow.com/questions/750172/how-do-i-change-the-author-of-a-commit-in-git">Change the author and committer name and e-mail of multiple commits in Git</a></p></li> <li><p><a href="https://stackoverflow.com/questions/3042437/change-commit-author-at-one-specific-commit">Change commit author at one specific commit</a></p></li> <li><p><a href="https://stackoverflow.com/questions/2246208/change-first-commit-of-project-with-git">Change first commit of project with Git?</a></p></li> <li><p><a href="https://stackoverflow.com/questions/4493936/git-could-i-change-my-name-and-surname-in-all-previous-commits">Could I change my name and surname in all previous commits?</a></p></li> </ol> <p>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 <code>git filter-branch -f --env-filter</code> 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. </p> <p>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 <code>git rebase -i</code> , which I'm informed here: <a href="http://lists-archives.org/git/729800-rebase-i-segmentation-fault-and-another-problem.html" rel="nofollow noreferrer">http://lists-archives.org/git/729800-rebase-i-segmentation-fault-and-another-problem.html</a> is completely logical. The only thing that (thankfully) works is <code>git rebase --abort</code>, which saved my ass multiple times. </p> <p>I hope my frustration does not repel, but instead amuse you and stimulate you to help me. I'd like: </p> <ul> <li><p>To remove said author info finally</p></li> <li><p>Bonus: To get rid of all the branches containing the same information. </p></li> </ul> <p>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. </p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload