Find the git branch or branches from commit id

前端 未结 1 1941
暖寄归人
暖寄归人 2021-02-13 12:47

Actually am try to get a report on merge conflicts. I used \'git blame\' to see who has changed what line, but i couldn\'t find the branch and repository name information.

1条回答
  •  执念已碎
    2021-02-13 13:39

    git blame should only give you the revision and author, but:

    • as mentioned in "Git: Finding what branch a commit came from", you cannot easily pinpoint the branch where that commit has been made (branches can be renamed, moved, deleted...), even though git branch --contains is a start.
    • I doubt you can find the repository it came from (unless maybe by looking hard in the git log results, trying to find the parent of that commit comming from a ref/remotes namespace).

    Now if you have a proper .mailmap at the toplevel of the repository, you will have the right email addresses as well.

    In the simple form, each line in the file consists of a canonical real name of an author, a whitespace, and an email address used in the commit (enclosed by < and >) to map to the name. For example:

    Proper Name 
    

    0 讨论(0)
提交回复
热议问题