'Do numbers in git branch names associate with GitHub Issues?

I am trying to learn about git/GitHub workflow. I'm on branches, and learning about the different typical branch name prefixes. I've read several of the key articles.

If I name a branch issue-*, you can correspond that to an existing issue in the GitHub issue tracker by adding its number, like issue-32, is that right?

  1. Is this number only for the developer's own tracking, or does it actually get associated with the issue, such that the branch somehow appears linked on the issue?

  2. If a topic branch named like issue-32 does form an association with the issue, would other conceivable topic group prefixes do the same? Ie. If you were storing a feature note as issue 76, does branch feature-something-76 make any association with it?

Thinking it through, am I wrong to think that a branch could be associated with an issue? Is it, rather, that you associate commits with issues? And, if that's the case for issue-*, it's also the case for feature-*?

Ie. Should I only ever be referencing issue numbers in a commit message, eg. "Fixes issue #32" (and is there any particular nomenclature required beside use of the integer?)?

This answer shows GitHub, only a few weeks ago, introduced a new feature to create a new branch from an existing issue. But that's a) the other way around from my question and b) from the web (not sure how I'd do this in VS Code). Also seems like the linkage only happens upon a pull request.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source