Faisal Faisal - 11 months ago 60
Git Question

GitHub commit with "invalid email"

I need to change the author's email of old commits on Github. I found a script on GitHub that allows to change the author email from old (wrong one) to new article link
, but in my case,I don't know what email did I use to push the commits. So is there anyway to find out the "invalid email" and correct it? . On the blue circle (as per screenshot) asking me to correct my email on GitHub which is correct but how could that resolve the issue for old commits? Any help would be much appreciated.
[Screen shot[2]


On the far right side you can see the commit hash used for the commit in question. Use

$ git show <commit>

and look at the Author line. There you should see a name and an email address.

Keep in mind, that rewriting those commits with the new email address will rewrite the history of every commit from there on (because the parent hashes will change too).