I have a number of commits on github that look like this:
Is there a way of rebasing so that I can get rid of this and simply have the commit marked as by me?
First I would check that your git is configured with the correct user information. Run git config --list
to verify that everything is correct.
You can also try playing with interactive rebasing to edit a commit.
git rebase -i <commit ID>
edit
, save and exitgit commit --amend --author="Author Name <[email protected]>
Similar to Question Change commit author at one specific commit.
With only a few commits you can manually do:
git rebase --root -i
to rebase everything from current HEAD to its root.edit
git commit --amend --author "Name <email>"
git rebase --continue
"Name <email>"
has to be your wished name and email of course.
With more than a few commits this manual approach might get cumbersome.
PS: This messes up your repo-history, because the author information is included when generating the sha-hash for the commit. So do this with care. Next time set up your user.name and user.email properly.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With