Skip to content

Instantly share code, notes, and snippets.

@jameshfisher
Created January 5, 2014 16:31
Show Gist options
  • 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 [email protected]:b9cc265982870c091a1e tmp-dir && cd tmp-dir && git push -f [email protected]:8270253.git
@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