find out who created a branch on a remote git repository
I’m pruning some branches off of a git remote.
How can I find out who created a branch on a remote git repository?
Maybe there is something similar to
git branch -r --show-user?
2 Solutions collect form web for “find out who created a branch on a remote git repository”
.git/logs/refs/heads/BRANCHNAME. The first line should contain information about the creation of the branch, including the user who created it and the commit from which the branch “forked”.
git reflog can be used to examine the file programmatically; see
git help reflog for details.
I don’t think there is a completely general answer to this in all cases. Consider:
A----B----C \ D----E----F \ G----H----I
Where was the branch containing commit I created? Was it a branch created from E, or from B. Both are possibilities – in one case, you have a branch created at D from B, then another branch created at G from E, in the other, you have D created from B, and then F created from E – in other words, the same tree could be represented like this:
A----B----C \ D----E----G----H----I \ F
Or even this:
A----B----D----E----G----H----I \ \ C F
All three of the above are topologically equivalent, and all three would give different answers to “where did branch I start?”…