Frecuentemente publicamos actualizaciones de nuestra documentación. Es posible que la traducción de esta página esté en curso. Para conocer la información más actual, visita la documentación en inglés. Si existe un problema con las traducciones en esta página, por favor infórmanos.
GitHub AE is currently under limited release. Please contact our Sales Team to find out more.

Creating gists

You can create two kinds of gists: internal and secret. Create an internal gist if you're ready to share your ideas with enterprise members or a secret gist if you're not.

En este artículo

About gists

Every gist is a Git repository, which means that it can be forked and cloned. When you create a gist, the gist will be associated with your account and you will see it in your list of gists when you navigate to your página de inicio de gist, http(s)://[hostname]/gist or http(s)://gist.[hostname] si los subdominios están habilitados .

Gists can be internal or secret. Internal gists show up in Discover, http(s)://[hostname]/gist/discover or http(s)://gist.[hostname]/discover si los subdominios están habilitados, where enterprise members can browse new gists as they're created. They're also searchable, so you can use them if you'd like other people to find and see your work.

Secret gists don't show up in Discover, http(s)://[hostname]/gist/discover or http(s)://gist.[hostname]/discover si los subdominios están habilitados and are not searchable. Secret gists aren't private. If you send the URL of a secret gist to another enterprise member, they'll be able to see it. However, if any other enterpise member discovers the URL, they'll also be able to see your gist. If you need to keep your code away from prying eyes, you may want to create a private repository instead.

Luego de crear un gist, no puedes convertirlo para que deje de ser público y se vuelva secreto.

You'll receive a notification when:

  • You are the author of a gist.
  • Someone mentions you in a gist.
  • You subscribe to a gist, by clicking Subscribe at the top of any gist.

You can discover internal gists others have created by going to the página de inicio de gist, http(s)://[hostname]/gist or http(s)://gist.[hostname] si los subdominios están habilitados and clicking All Gists. This will take you to a page of all gists sorted and displayed by time of creation or update. You can also search gists by language with Gist Search, http(s)://[hostname]/gist/search or http(s)://gist.[hostname]/search si los subdominios están habilitados. Gist search uses the same search syntax as code search.

Since gists are Git repositories, you can view their full commit history, complete with diffs. You can also fork or clone gists. For more information, see "Forking and cloning gists".

You can download a ZIP file of a gist by clicking the Download ZIP button at the top of the gist. You can embed a gist in any text field that supports Javascript, such as a blog post. To get the embed code, click the clipboard icon next to the Embed URL of a gist. To embed a specific gist file, append the Embed URL with ?file=FILENAME.

Creating a gist

Follow the steps below to create a gist.

You can also create a gist using the CLI de GitHub. For more information, see "gh gist create" in the CLI de GitHub documentation.

Alternatively, you can drag and drop a text file from your desktop directly into the editor.

  1. Sign in to GitHub Enterprise.

  2. Navigate to your página de inicio de gist, http(s)://[hostname]/gist or http(s)://gist.[hostname] si los subdominios están habilitados .

  3. Type an optional description and name for your gist.

    Gist name description

  4. Type the text of your gist into the gist text box.

    Gist text box

  5. Optionally, to create an internal gist, click , then click Create internal gist.

    Drop-down menu to select gist visibility

  6. Click Create secret Gist or Create internal gist.

    Button to create gist

¿Te ayudó este documento?

Privacy policy

Help us make these docs great!

All GitHub docs are open source. See something that's wrong or unclear? Submit a pull request.

Make a contribution

O, learn how to contribute.