0

Using git, I have mistakenly pushed some of my commits then noticed that my name is having a spelling mistake. Then i corrected my name from git config. But git log does not show under single user. I would like to modify my misspelled name into newly corrected name in the commits that I have already pushed, so that git will show all logs under single user (Me).

Is there any way?

Sazzad Hissain Khan
  • 37,929
  • 33
  • 189
  • 256
  • 1
    Possible duplicate of [Change the author of a commit in Git](http://stackoverflow.com/questions/750172/change-the-author-of-a-commit-in-git) – Tristram Gräbener Dec 23 '15 at 16:30
  • duplicate of: http://stackoverflow.com/questions/750172/change-the-author-of-a-commit-in-git – Tristram Gräbener Dec 23 '15 at 16:30
  • i am asking for remote commits not about local commits @TristramGräbener – Sazzad Hissain Khan Dec 23 '15 at 16:36
  • In fairness it's really the same thing: The real difference is that since you're expressly talking about a remote (and presumably shared) repo the answer (more gently put in the comments on the linked question) is that you shouldn't try to make the changes, though it is possible and the answers on the original actually tell you how to do it. – Guildencrantz Dec 23 '15 at 16:44

1 Answers1

2

Short answer: No.

Longer answer: You'd have to replace the commit with a new commit that has the new, correctly spelled, name in it (all attributes of a commit are part of the blob that git stores) and then you'd have to force push the branch with the new commits.

If it's a personal project this shouldn't be an issue. If it's an active project with other commiters I'm sorry to say you really shouldn't even think trying to fix it.

Guildencrantz
  • 1,875
  • 1
  • 16
  • 30