# Creating gists

With GitHub for Visual Studio, you can easily create gists directly from the editor.

1. [Sign in](../getting-started/authenticating-to-github.md) to GitHub.

2. Open a file in the Visual Studio text editor.

3. Select the section of text that you want to create a gist from.

4. Right click and select **Create a GitHub Gist** from the **GitHub** submenu to create the gist on GitHub.

   ![Location of Create a GitHub Gist in the GitHub submenu](images/create-github-gist-menu.png)

5. To create the gist on GitHub Enterprise select **Create an Enterprise Gist** option from the submenu.
    ![Location of Create a Enterprise Gist in the GitHub submenu](images/create-enterprise-gist-menu.png)

6. In the **Create a GitHub Gist** dialog, check that the filename is correct and optionally add a description.

   ![GitHub Gist creation dialog window](images/create-gist-dialog.png)

7. If you want the gist to be private, check the **Private Gist** checkbox.

8. Click **Create**.

9. Once the gist is created it will be opened in your browser.
