0

When drafting a new release you need to pick a branch you're targeting. draft new release

Where can you find the branch name you picked for particular release? Can't find it in list of releases.

list of releases

joym8
  • 4,014
  • 3
  • 50
  • 93
  • 3
    A release references a commit. That a particular branch (or many) pointed towards that commit at release creation time is an irrelevant detail. As usual, the question is: why do you want to know? – CodeCaster Feb 15 '23 at 21:35
  • @CodeCaster I'm trying to create new branch from the branch that was used at release time. – joym8 Feb 15 '23 at 22:13
  • 2
    Just create a branch from the commit `d867a89` then. – CodeCaster Feb 16 '23 at 09:46
  • Does this answer your question? [How to create the branch from specific commit in different branch](https://stackoverflow.com/questions/8483983/how-to-create-the-branch-from-specific-commit-in-different-branch) – AD7six Feb 16 '23 at 10:55
  • 1
    Alternatively [How to list branches that contain a given commit?](https://stackoverflow.com/questions/1419623/how-to-list-branches-that-contain-a-given-commit) – AD7six Feb 16 '23 at 10:57
  • @AD7six thanks this helped me in what I was trying to do `git branch --contains ` – joym8 Feb 16 '23 at 21:43

1 Answers1

0

If the repo is public, you can find the branch under target_commitish in the JSON data here:

https://api.github.com/repos/<org>/<repo>/releases/tags/<tag>

For example, this page shows "target_commitish": "main"

If the branch has newer commits, you can click on the release name to open a new page which shows the branch name. For example, this release's target branch is main:

enter image description here

Etienne Laurin
  • 6,731
  • 2
  • 27
  • 31