Skip to content

Instantly share code, notes, and snippets.

@jameshfisher
Created January 5, 2014 16:31
Show Gist options
  • Star 18 You must be signed in to star a gist
  • Fork 5 You must be signed in to fork a gist
  • Save jameshfisher/8270329 to your computer and use it in GitHub Desktop.
Save jameshfisher/8270329 to your computer and use it in GitHub Desktop.
How to make a private Gist public

Github provides no facility to do this via the UI. This is sad, because it would be extremely useful in order to draft something before publishing it. It would also be trivial for them to implement. Never mind; here's how to do it manually:

  1. Get the "Clone this Gist" text from the left-hand side of the private Gist, e.g. https://gist.github.com/b9cc265982870c091a1e.git, and extract the ID b9cc265982870c091a1e.
  2. Go to https://gist.github.com/ and create a dummy new public Gist.
  3. Get the "Clone this Gist" text from the left-hand side, e.g. https://gist.github.com/8270253.git, and extract the ID 8270253.
  4. git clone git@gist.github.com:b9cc265982870c091a1e tmp-dir && cd tmp-dir && git push -f git@gist.github.com:8270253.git
@osbm
Copy link

osbm commented Nov 24, 2021

Now, i could make my gist public by going into gist Edit page. There is a button named Make Public
image

@wildeyes
Copy link

wildeyes commented Feb 5, 2023

I don't have a button like you, still in 2023, @osbm

@thoran
Copy link

thoran commented Jun 2, 2023

@wildeyes I thought so too, but it turns out that you have to hit the Edit button, which is implied by @osbm.

@rambabu-patidar
Copy link

There is no option to do that, rather copy everything and create a new public gist.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment