List of branches a commit appears on

前端 未结 3 1570
你的背包
你的背包 2021-01-13 11:58

Using the GitHub API (v3) I\'d like to figure out which branches a commit appears on. I didn\'t find a way to directly query this, either through repo commits or the commit

3条回答
  •  野趣味
    野趣味 (楼主)
    2021-01-13 12:46

    I haven't checked if this is directly supported by the GitHub API, but this is trivial to do using plain Git:

    git branch --all --contains 
    

    That will list all branches (local and remote) in a local repository that contain the given commit.

提交回复
热议问题