I created a gist and cloned it locally where I am happily managing it. I also created a development branch and committed/pushed it (mainly as an exercise to understand git). I can see and manage all of this using posh~git locally, but I can't find any trace of the new branch in my gists at https://gist.github.com or in my git repo's.
Is this a basic (and understandable) limitation of the gist interface or is there a way to select branches on a gist?
My motivation is to share rendered the gists using references to the included assets.
but I can't find any trace of the new branch in my gists at https://gist.github.com or in my git repo's.
Not only gists do not support branches, but the default branch has just (Feb. 2022) changed:
Gists Now Support Alternative Default Branch Names
As you may or may not know, gists are actually Git repositories.
New gists are now created with a default branch name of either main or the alternative default branch name you've defined in your user settings.
(See git config --global init.defaultbranch xxx
, in Git 2.28+, Q3 2020)
This matches how other repositories are created on GitHub.
- More information about default branches
- How to change the default branch name for new repositories
- Learn more about the branch renaming effort in the github/renaming repository