Cool Blue
Cool Blue

Reputation: 6476

Managing and viewing branches in a GIST

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.

Upvotes: 11

Views: 1656

Answers (2)

VonC
VonC

Reputation: 1330102

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.

Upvotes: 2

o11c
o11c

Reputation: 16156

This is a limitation of gist.github.com. If you need to use other features, make it an ordinary repo under github.com instead of a gist.

I am not aware of any feature that gist has that ordinary repos do not have.

Upvotes: 8

Related Questions