DEV Community

loading...

How to create and pin a gist on GitHub

Michelle Mannering
Developer Relations | Hackathon Queen | Community Manager
Updated on ・3 min read

If you haven't heard of a gist before, it's an easy way to save, store, and share snippets of code or data with others. These little pieces of information are stored on GitHub and are easily accessible. A gist can be public or private, and they are available via a URL, just like a repository.

How to create a gist

Firstly, how do you create a gist in GitHub? You can't really share information unless you know how to create it first right? Since everyone has been recently talking about GitHub Skyline why don't we download my skyline.

ezgif-4-5370f601a9b3

We can upload and save the *.stl file as a gist. That way I can easily share my file for 3D printing, or send it to anyone I like. Here's how to download and save your Skyline:

  1. Go to GitHub Skyline
  2. Enter your username and select the year you want to showcase Step 1
  3. Once your Skyline has loaded, click "Download STL file" Step 3
  4. Go to GitHub and make sure you're signed in
  5. Navigate to your profile and click options in the top right hand corner Step 5
  6. Roll down and click "Your gists" Step 6
  7. Click the + symbol in the top right hand corner Step 7
  8. Name your gist and drag and drop your stl file Step 8  long
  9. Click the drop down to change between public and private (secret) gist Step 9
  10. Click "create [public/private] gist" Step 10

Now you should be able to view your new gist. Since the Skyline is a 3D file, GitHub allows you to view the file in 3D.

ezgif-6-ae9bf8306b74

Bonus: if you accidentally created a secret gist and you want to make it public, you can do so easily. Click "Edit" up in the top right hand bar, then click "Make public".

Edit and make public

How to pin a gist

Now that you've created a gist, you might want to quickly find this gist. All you need to do in order to save or pin your gist is to star it. Click on the gist you want to pin
and then click "Star" button in the top right.

Star

Your gist is now easily found whenever you click "Starred" under gists, or select "Starred gists" from the drop down.

Toggle between "All gists" and "Starred gists":
Tabbed or Star

Select starred gists from your profile dropdown:
Drop down starred

You can star other users' gists and quickly share a gist by copying the URL for that gist.

How are you going to use this feature? Is there anything we missed? Let me know in the comments below, hit me up on Twitter, or go ahead and star my gist on GitHub.

Discussion (2)

Collapse
zippytyro profile image
Shashwat Verma

Great tutorial, just got mine. Saw people doing didn't know about it.

Collapse
mishmanners profile image
Michelle Mannering Author

Thank you!