137

I've uploaded a Github Gist and I've set it to be secret.

Now I want to change the gist to public, but I can't find how to set it public.

Could anyone help me about that?

Amir Pourmand
  • 519
  • 6
  • 17
jianfeng
  • 2,440
  • 4
  • 21
  • 28
  • 13
    See http://chris.dzombak.name/blog/2011/05/making-private-gist-public.html – Undolog May 28 '13 at 16:07
  • 14
    I found this question useful. Why was it closed? Programmers are the intended audience, and applying Undolog's answer definitely requires a programmer's skillset. Can anyone suggest a more appropriate Q&A site than stackoverflow for this question to be posted to? If not, I'd argue that's further evidence that stackoverflow is indeed the appropriate forum. @mitch-wheat – Stuart Berg Dec 04 '13 at 15:52
  • Because it is more suited to http://programmers.stackexchange.com/ – nathanchere Dec 13 '13 at 00:48
  • 7
    @FerretallicA How so? [programmers.se] is for *conceptual questions about software development*. [so] includes [questions about] *software tools commonly used by programmers*. – Bob Jan 03 '14 at 13:05
  • 5
    "Closed as off topic" begs to differ. – nathanchere Jan 04 '14 at 23:35
  • You can nominate it for reopening by clicking on the reopen link at the bottom of the question. – Phillip Senn Jan 29 '14 at 19:41
  • It is possible to switch visibility for a Gist now (May 2014). See [my answer below](http://stackoverflow.com/a/23575535/6309). – VonC May 10 '14 at 12:29

3 Answers3

100

I upload a Gist code and set it to be secret.
Now I want to change the gist to public, but I can't find how to set it public.

Since May, 9th 2014, it is possible: "Change the visibility of your Gists"

You can change the visibility of your Gists whenever you want.

When editing a Gist you'll now notice a new option to toggle the visibility between Public and Secret.
The URL for your Gist will never change, just its visibility.

https://cloud.githubusercontent.com/assets/222/2894242/b9be0cd4-d550-11e3-91e8-415b178fb561.gif


As commented by GiDo though, since 2016:

you can only make public a gist that was previously private.
When it is public it will stay public.

This is confirmed in "Creating gists"

After creating a gist, you cannot convert it from public to secret.

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • @Muhammad it is best to ask a new question here on Stack Overflow: you will have the help of many Java specialists that way. – VonC May 10 '14 at 13:42
  • @VonC How is your gif made? Is there any convenient softwares for that? – cwhy Jan 12 '16 at 02:34
  • @cwhy this one is from the GitHub site. But if I had to guess, I would say https://itunes.apple.com/us/app/gifgrabber/id668208984?mt=12 (Mac) or https://screentogif.codeplex.com/ (Windows) – VonC Jan 12 '16 at 05:37
  • You have to know that you cannot convert your public Gist into a secret Gist (only Public -> Secret). See https://help.github.com/articles/creating-gists/#creating-a-gist – GiDo Jul 05 '16 at 15:45
  • @GiDo "you cannot convert your public Gist into a secret Gist (only Public -> Secret)" isn't that the same? "public Gist into a secret" and "Public -> Secret". – VonC Jul 05 '16 at 15:47
  • 4
    @VonC my bad, I wanted to write "(only Secret -> Public)". So basically you can only make public a gist that was previously private. When it is public it will stay public. – GiDo Jul 07 '16 at 16:28
11

Update:

You can still convert a secret gist to a public gist by first selecting "Edit" -> "Make Public". This feature has been partially rolled back, however, since 12/15/16 and you will no longer be able to switch it back to secret.

From the docs:

After creating a gist, you cannot convert it from public to secret.

nick
  • 1,880
  • 17
  • 27
  • 3
    Why on Earth would they do such a thing? – Jonathan Wood Mar 03 '20 at 22:32
  • @JonathanWood I've no idea, but they must've had a good reason. – luizfls Apr 21 '20 at 17:03
  • Can we delete them instead? – alper Jul 20 '20 at 13:09
  • Probably because the gist id is always the same, and secret gists aren't really secret, just hidden, so the formerly-public gist could still be accessed by id for anyone with a link. That said, it's not like this change truly protects gists either way, just makes it a little less easy to shoot yourself in the foot. – ggorlen Aug 26 '23 at 18:29
9

Correction; this information is outdated. See VonC's answer from May 9, 2014.

Original answer:

No, you'll have to create a new public gist and copy/paste the contents.

If you want to preserve all of the history of the original secret gist, Chris Dzombak has written an article walking you through how to clone a gist, step-by-step, to preserve its change history.

Bob Gilmore
  • 12,608
  • 13
  • 46
  • 53