Git: which commit branch originated from

From what I saw, the look looks rather gloomy, but just in case, here are my requirements:

  • Determine which branch this commit belongs to.
  • Determine which commits occurred in this branch.

From what I read, both of these scenarios seem impossible, doubly, after the branch in question has been merged with the master.

+4
source share
1 answer

You might want to try this script: https://github.com/SethRobertson/git-what-branch

EXAMPLES # git-what-branch --all 1f9c381fa3e0b9b9042e310c69df87eaf9b46ea4 v2.6.12-rc3-450-g1f9c381 used the following minimal temporal path: merged to v2.6.12-rc3-461-g84e48b6 @Tue May 3 18:27:24 2005 merged to v2.6.12-rc3-590-gbfd4bda @Thu May 5 08:59:37 2005 v2.6.12-rc3-590-gbfd4bda is on v2.6.12-n v2.6.12-rc3-590-gbfd4bda is on v2.6.12-rc4-n [...] v2.6.12-rc3-590-gbfd4bda is on v2.6.36-rc4-n v2.6.12-rc3-590-gbfd4bda is on v2.6.36-rc5-n(aka master) 
0
source

Source: https://habr.com/ru/post/1386422/


All Articles