What does UserA committed with UserB 13 days ago on github mean?

前端 未结 3 1698
迷失自我
迷失自我 2020-12-25 09:48

I am interested in knowing which one of the two users made the file changes when github lists both. The git record contains only UserA however.

3条回答
  •  孤独总比滥情好
    2020-12-25 10:15

    @venkatKA's answer is accurate and descriptive but I thought I'd add a few details.

    git cat-file -p HEAD can be used to print out information about the commit

    tree d85ed3c3a055c95445898a5119ea0a532459fdsf
    parent 0b6ed951b2c04b4134c91ffa053b4330edfdffc1
    author AuthA  1487356245 +0000
    committer AutbB  1487356245 +0000
    

    If you want to fix historic committers (for example if you are changing your identity) then you can use:

    git filter-branch -f --tree-filter "GIT_COMMITTER_NAME='New Author'; GIT_COMMITTER_EMAIL='New Author'" 
    

    The standard comments about rebases breaking history and why revisionism is a bad idea apply.

提交回复
热议问题