Skip to content

Instantly share code, notes, and snippets.

@jameshfisher
Created January 5, 2014 16:31
Show Gist options
  • Select an option

  • Save jameshfisher/8270329 to your computer and use it in GitHub Desktop.

Select an option

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

osbm commented Nov 24, 2021

Copy link
Copy Markdown

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

@wildeyes

wildeyes commented Feb 5, 2023

Copy link
Copy Markdown

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

@thoran

thoran commented Jun 2, 2023 •

Copy link
Copy Markdown

@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
Copy Markdown

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