Tried to update some commit authors in a repo but says authored by X, commited by Y










1















I noticed something which might be beneficial to me, but i was not sure what was going on with my version. How to change the commit author for one specific commit?



So, I saw a great 1-liner which would say, start at the first commit, and ammend all authors to XXX. I thought it was going to work, but when I pushed, it said multple heads. I pulled and pushed and noticed that when looking at the repo history, I saw a bunch files now saying:




Authored by X, Comitted by Y.




I was hoping to strip and update all emails accordingly for some repos with relevant or correct spellings etc.



My desired end state is to completely override and replace it, so it never shows up in the git history at all. It seems that my way is not quite correct.



The reason is that I have broken or Invalid Authors/Committers, and emails etc. I want to be able to update them, and eventually set up a system to do auto-email routing to colleagues who no longer work at our company.










share|improve this question
























  • Why are you trying to rewrite the history of a GitHub repo? This is generally a bad thing to do.

    – Tim Biegeleisen
    Nov 13 '18 at 2:25











  • I was working on some of my repos, and i noticed wrong, broken, or incorrect Author names, emails etc... So if i can figure out how to properly accomplish this, I could expand it to not just replace entirely, but tweaks etc. It seems like it would laterally help my work as well, as I have different users for different teams, and I want to eventually scan and update those as well

    – Fallenreaper
    Nov 13 '18 at 2:29












  • @TimBiegeleisen I also noticed that GIT has an example of this as well help.github.com/articles/changing-author-info/#platform-mac but it seems that even after I make the adjustments, I still dont see it work explicitly as designed, given my old email was "1234567"

    – Fallenreaper
    Nov 13 '18 at 3:19











  • @Fallenreaper, have you looked into git-filter-branch? This answer looks to be up your alley - stackoverflow.com/questions/4493936/…

    – miqh
    Nov 13 '18 at 3:21











  • @miqh I was looking into it, and with github help section, they were also listing that as an option. I was looking at the code snippet from your link: git filter-branch --commit-filter 'if [ "$GIT_COMMITTER_EMAIL” = “1234567” ]; then export GIT_AUTHOR_NAME=“MYNAME”; export GIT_AUTHOR_EMAIL=TEST@EMAIL.COM; fi; git commit-tree "$@"' but it gives me an unexpected EOF.

    – Fallenreaper
    Nov 13 '18 at 4:09
















1















I noticed something which might be beneficial to me, but i was not sure what was going on with my version. How to change the commit author for one specific commit?



So, I saw a great 1-liner which would say, start at the first commit, and ammend all authors to XXX. I thought it was going to work, but when I pushed, it said multple heads. I pulled and pushed and noticed that when looking at the repo history, I saw a bunch files now saying:




Authored by X, Comitted by Y.




I was hoping to strip and update all emails accordingly for some repos with relevant or correct spellings etc.



My desired end state is to completely override and replace it, so it never shows up in the git history at all. It seems that my way is not quite correct.



The reason is that I have broken or Invalid Authors/Committers, and emails etc. I want to be able to update them, and eventually set up a system to do auto-email routing to colleagues who no longer work at our company.










share|improve this question
























  • Why are you trying to rewrite the history of a GitHub repo? This is generally a bad thing to do.

    – Tim Biegeleisen
    Nov 13 '18 at 2:25











  • I was working on some of my repos, and i noticed wrong, broken, or incorrect Author names, emails etc... So if i can figure out how to properly accomplish this, I could expand it to not just replace entirely, but tweaks etc. It seems like it would laterally help my work as well, as I have different users for different teams, and I want to eventually scan and update those as well

    – Fallenreaper
    Nov 13 '18 at 2:29












  • @TimBiegeleisen I also noticed that GIT has an example of this as well help.github.com/articles/changing-author-info/#platform-mac but it seems that even after I make the adjustments, I still dont see it work explicitly as designed, given my old email was "1234567"

    – Fallenreaper
    Nov 13 '18 at 3:19











  • @Fallenreaper, have you looked into git-filter-branch? This answer looks to be up your alley - stackoverflow.com/questions/4493936/…

    – miqh
    Nov 13 '18 at 3:21











  • @miqh I was looking into it, and with github help section, they were also listing that as an option. I was looking at the code snippet from your link: git filter-branch --commit-filter 'if [ "$GIT_COMMITTER_EMAIL” = “1234567” ]; then export GIT_AUTHOR_NAME=“MYNAME”; export GIT_AUTHOR_EMAIL=TEST@EMAIL.COM; fi; git commit-tree "$@"' but it gives me an unexpected EOF.

    – Fallenreaper
    Nov 13 '18 at 4:09














1












1








1


1






I noticed something which might be beneficial to me, but i was not sure what was going on with my version. How to change the commit author for one specific commit?



So, I saw a great 1-liner which would say, start at the first commit, and ammend all authors to XXX. I thought it was going to work, but when I pushed, it said multple heads. I pulled and pushed and noticed that when looking at the repo history, I saw a bunch files now saying:




Authored by X, Comitted by Y.




I was hoping to strip and update all emails accordingly for some repos with relevant or correct spellings etc.



My desired end state is to completely override and replace it, so it never shows up in the git history at all. It seems that my way is not quite correct.



The reason is that I have broken or Invalid Authors/Committers, and emails etc. I want to be able to update them, and eventually set up a system to do auto-email routing to colleagues who no longer work at our company.










share|improve this question
















I noticed something which might be beneficial to me, but i was not sure what was going on with my version. How to change the commit author for one specific commit?



So, I saw a great 1-liner which would say, start at the first commit, and ammend all authors to XXX. I thought it was going to work, but when I pushed, it said multple heads. I pulled and pushed and noticed that when looking at the repo history, I saw a bunch files now saying:




Authored by X, Comitted by Y.




I was hoping to strip and update all emails accordingly for some repos with relevant or correct spellings etc.



My desired end state is to completely override and replace it, so it never shows up in the git history at all. It seems that my way is not quite correct.



The reason is that I have broken or Invalid Authors/Committers, and emails etc. I want to be able to update them, and eventually set up a system to do auto-email routing to colleagues who no longer work at our company.







git github






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 13 '18 at 2:34







Fallenreaper

















asked Nov 13 '18 at 2:23









FallenreaperFallenreaper

4,13483484




4,13483484












  • Why are you trying to rewrite the history of a GitHub repo? This is generally a bad thing to do.

    – Tim Biegeleisen
    Nov 13 '18 at 2:25











  • I was working on some of my repos, and i noticed wrong, broken, or incorrect Author names, emails etc... So if i can figure out how to properly accomplish this, I could expand it to not just replace entirely, but tweaks etc. It seems like it would laterally help my work as well, as I have different users for different teams, and I want to eventually scan and update those as well

    – Fallenreaper
    Nov 13 '18 at 2:29












  • @TimBiegeleisen I also noticed that GIT has an example of this as well help.github.com/articles/changing-author-info/#platform-mac but it seems that even after I make the adjustments, I still dont see it work explicitly as designed, given my old email was "1234567"

    – Fallenreaper
    Nov 13 '18 at 3:19











  • @Fallenreaper, have you looked into git-filter-branch? This answer looks to be up your alley - stackoverflow.com/questions/4493936/…

    – miqh
    Nov 13 '18 at 3:21











  • @miqh I was looking into it, and with github help section, they were also listing that as an option. I was looking at the code snippet from your link: git filter-branch --commit-filter 'if [ "$GIT_COMMITTER_EMAIL” = “1234567” ]; then export GIT_AUTHOR_NAME=“MYNAME”; export GIT_AUTHOR_EMAIL=TEST@EMAIL.COM; fi; git commit-tree "$@"' but it gives me an unexpected EOF.

    – Fallenreaper
    Nov 13 '18 at 4:09


















  • Why are you trying to rewrite the history of a GitHub repo? This is generally a bad thing to do.

    – Tim Biegeleisen
    Nov 13 '18 at 2:25











  • I was working on some of my repos, and i noticed wrong, broken, or incorrect Author names, emails etc... So if i can figure out how to properly accomplish this, I could expand it to not just replace entirely, but tweaks etc. It seems like it would laterally help my work as well, as I have different users for different teams, and I want to eventually scan and update those as well

    – Fallenreaper
    Nov 13 '18 at 2:29












  • @TimBiegeleisen I also noticed that GIT has an example of this as well help.github.com/articles/changing-author-info/#platform-mac but it seems that even after I make the adjustments, I still dont see it work explicitly as designed, given my old email was "1234567"

    – Fallenreaper
    Nov 13 '18 at 3:19











  • @Fallenreaper, have you looked into git-filter-branch? This answer looks to be up your alley - stackoverflow.com/questions/4493936/…

    – miqh
    Nov 13 '18 at 3:21











  • @miqh I was looking into it, and with github help section, they were also listing that as an option. I was looking at the code snippet from your link: git filter-branch --commit-filter 'if [ "$GIT_COMMITTER_EMAIL” = “1234567” ]; then export GIT_AUTHOR_NAME=“MYNAME”; export GIT_AUTHOR_EMAIL=TEST@EMAIL.COM; fi; git commit-tree "$@"' but it gives me an unexpected EOF.

    – Fallenreaper
    Nov 13 '18 at 4:09

















Why are you trying to rewrite the history of a GitHub repo? This is generally a bad thing to do.

– Tim Biegeleisen
Nov 13 '18 at 2:25





Why are you trying to rewrite the history of a GitHub repo? This is generally a bad thing to do.

– Tim Biegeleisen
Nov 13 '18 at 2:25













I was working on some of my repos, and i noticed wrong, broken, or incorrect Author names, emails etc... So if i can figure out how to properly accomplish this, I could expand it to not just replace entirely, but tweaks etc. It seems like it would laterally help my work as well, as I have different users for different teams, and I want to eventually scan and update those as well

– Fallenreaper
Nov 13 '18 at 2:29






I was working on some of my repos, and i noticed wrong, broken, or incorrect Author names, emails etc... So if i can figure out how to properly accomplish this, I could expand it to not just replace entirely, but tweaks etc. It seems like it would laterally help my work as well, as I have different users for different teams, and I want to eventually scan and update those as well

– Fallenreaper
Nov 13 '18 at 2:29














@TimBiegeleisen I also noticed that GIT has an example of this as well help.github.com/articles/changing-author-info/#platform-mac but it seems that even after I make the adjustments, I still dont see it work explicitly as designed, given my old email was "1234567"

– Fallenreaper
Nov 13 '18 at 3:19





@TimBiegeleisen I also noticed that GIT has an example of this as well help.github.com/articles/changing-author-info/#platform-mac but it seems that even after I make the adjustments, I still dont see it work explicitly as designed, given my old email was "1234567"

– Fallenreaper
Nov 13 '18 at 3:19













@Fallenreaper, have you looked into git-filter-branch? This answer looks to be up your alley - stackoverflow.com/questions/4493936/…

– miqh
Nov 13 '18 at 3:21





@Fallenreaper, have you looked into git-filter-branch? This answer looks to be up your alley - stackoverflow.com/questions/4493936/…

– miqh
Nov 13 '18 at 3:21













@miqh I was looking into it, and with github help section, they were also listing that as an option. I was looking at the code snippet from your link: git filter-branch --commit-filter 'if [ "$GIT_COMMITTER_EMAIL” = “1234567” ]; then export GIT_AUTHOR_NAME=“MYNAME”; export GIT_AUTHOR_EMAIL=TEST@EMAIL.COM; fi; git commit-tree "$@"' but it gives me an unexpected EOF.

– Fallenreaper
Nov 13 '18 at 4:09






@miqh I was looking into it, and with github help section, they were also listing that as an option. I was looking at the code snippet from your link: git filter-branch --commit-filter 'if [ "$GIT_COMMITTER_EMAIL” = “1234567” ]; then export GIT_AUTHOR_NAME=“MYNAME”; export GIT_AUTHOR_EMAIL=TEST@EMAIL.COM; fi; git commit-tree "$@"' but it gives me an unexpected EOF.

– Fallenreaper
Nov 13 '18 at 4:09













1 Answer
1






active

oldest

votes


















1














You should:



  • apply a filter-branch (as in here) changing both the author and committer.

    That will avoid seeing "authored by X, committed by Y"


  • git push --force at the end, in order to overwrite the remote repo history (make sure to warn any collaborator on that repo first)






share|improve this answer























  • This works perfectly. I was having issues and tried a bunch of different options. I am not sure why it is suddenly working today, but either way, i am happy.

    – Fallenreaper
    Nov 13 '18 at 23:08










Your Answer






StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");

StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53272865%2ftried-to-update-some-commit-authors-in-a-repo-but-says-authored-by-x-commited-b%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









1














You should:



  • apply a filter-branch (as in here) changing both the author and committer.

    That will avoid seeing "authored by X, committed by Y"


  • git push --force at the end, in order to overwrite the remote repo history (make sure to warn any collaborator on that repo first)






share|improve this answer























  • This works perfectly. I was having issues and tried a bunch of different options. I am not sure why it is suddenly working today, but either way, i am happy.

    – Fallenreaper
    Nov 13 '18 at 23:08















1














You should:



  • apply a filter-branch (as in here) changing both the author and committer.

    That will avoid seeing "authored by X, committed by Y"


  • git push --force at the end, in order to overwrite the remote repo history (make sure to warn any collaborator on that repo first)






share|improve this answer























  • This works perfectly. I was having issues and tried a bunch of different options. I am not sure why it is suddenly working today, but either way, i am happy.

    – Fallenreaper
    Nov 13 '18 at 23:08













1












1








1







You should:



  • apply a filter-branch (as in here) changing both the author and committer.

    That will avoid seeing "authored by X, committed by Y"


  • git push --force at the end, in order to overwrite the remote repo history (make sure to warn any collaborator on that repo first)






share|improve this answer













You should:



  • apply a filter-branch (as in here) changing both the author and committer.

    That will avoid seeing "authored by X, committed by Y"


  • git push --force at the end, in order to overwrite the remote repo history (make sure to warn any collaborator on that repo first)







share|improve this answer












share|improve this answer



share|improve this answer










answered Nov 13 '18 at 5:37









VonCVonC

848k29626973253




848k29626973253












  • This works perfectly. I was having issues and tried a bunch of different options. I am not sure why it is suddenly working today, but either way, i am happy.

    – Fallenreaper
    Nov 13 '18 at 23:08

















  • This works perfectly. I was having issues and tried a bunch of different options. I am not sure why it is suddenly working today, but either way, i am happy.

    – Fallenreaper
    Nov 13 '18 at 23:08
















This works perfectly. I was having issues and tried a bunch of different options. I am not sure why it is suddenly working today, but either way, i am happy.

– Fallenreaper
Nov 13 '18 at 23:08





This works perfectly. I was having issues and tried a bunch of different options. I am not sure why it is suddenly working today, but either way, i am happy.

– Fallenreaper
Nov 13 '18 at 23:08



















draft saved

draft discarded
















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53272865%2ftried-to-update-some-commit-authors-in-a-repo-but-says-authored-by-x-commited-b%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

𛂒𛀶,𛀽𛀑𛂀𛃧𛂓𛀙𛃆𛃑𛃷𛂟𛁡𛀢𛀟𛁤𛂽𛁕𛁪𛂟𛂯,𛁞𛂧𛀴𛁄𛁠𛁼𛂿𛀤 𛂘,𛁺𛂾𛃭𛃭𛃵𛀺,𛂣𛃍𛂖𛃶 𛀸𛃀𛂖𛁶𛁏𛁚 𛂢𛂞 𛁰𛂆𛀔,𛁸𛀽𛁓𛃋𛂇𛃧𛀧𛃣𛂐𛃇,𛂂𛃻𛃲𛁬𛃞𛀧𛃃𛀅 𛂭𛁠𛁡𛃇𛀷𛃓𛁥,𛁙𛁘𛁞𛃸𛁸𛃣𛁜,𛂛,𛃿,𛁯𛂘𛂌𛃛𛁱𛃌𛂈𛂇 𛁊𛃲,𛀕𛃴𛀜 𛀶𛂆𛀶𛃟𛂉𛀣,𛂐𛁞𛁾 𛁷𛂑𛁳𛂯𛀬𛃅,𛃶𛁼

Crossroads (UK TV series)

ữḛḳṊẴ ẋ,Ẩṙ,ỹḛẪẠứụỿṞṦ,Ṉẍừ,ứ Ị,Ḵ,ṏ ṇỪḎḰṰọửḊ ṾḨḮữẑỶṑỗḮṣṉẃ Ữẩụ,ṓ,ḹẕḪḫỞṿḭ ỒṱṨẁṋṜ ḅẈ ṉ ứṀḱṑỒḵ,ḏ,ḊḖỹẊ Ẻḷổ,ṥ ẔḲẪụḣể Ṱ ḭỏựẶ Ồ Ṩ,ẂḿṡḾồ ỗṗṡịṞẤḵṽẃ ṸḒẄẘ,ủẞẵṦṟầṓế