So I've managed to commit to a GitHub project as both domenic <[email protected]>
and Domenic Denicola <[email protected]>
. This is annoying, especially for generating summaries.
I know about how to change the authors/committers retroactively. However, this has lots of undesirable consequences for a project that is already pushed and public, e.g. changing all the hashes (and thus invalidating links to them people have made, or comments on them); losing the tags; and I'm afraid GitHub might even end up appending "committed 5 minutes ago by Domenic Denicola" to every single commit in the project. So that's not an option.
I was hoping there was some way to tell Git, "these two authors/committers are exactly the same person; count them as such." Is there?
Git aliases are a powerful workflow tool that create shortcuts to frequently used Git commands. Using Git aliases will make you a faster and more efficient developer. Aliases can be used to wrap a sequence of Git commands into new faux Git command.
Git store the name and the email of two persons for each commit: the committer and the author. The difference between the two is that the author is the person who wrote the changes, while the committer is the person who uploaded them the repository.
The git commit --amend --reset-author --no-edit command is especially useful if you created commits with the wrong author information, then set the correct author after-the-fact via git config .
Set up a .mailmap
file in your repo. See git help shortlog
for details, or check out the one for Git itself.
See Mapping authors
section: https://git-scm.com/docs/git-shortlog#_mapping_authors
If your email used to submit is different than the email associated with your account, you can add the additional email at https://github.com/settings/emails.
I had this problem when using Source Tree to commit to GitHub. It submits using the name: pcuser@pcFQDN, which is not my email address. Adding this false address to my GitHub account made all of my commits show as me. It does not require that the address be verified.
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