DEV Community

Cover image for Code Snippets with Gist
Jackson Reeves
Jackson Reeves

Posted on

Code Snippets with Gist

Gist is a cool resource. It’s for sharing code snippets anywhere online. It’s great if you want to share a few lines of your code instead of every document ever in your GitHub repo.

It’s related to GitHub, but in a really weird way. It’s a subsidiary or vertical of GitHub, so if you have a GitHub account (which we all do), then you automatically have a Gist account. Annoyingly, it’s difficult to access Gist from GitHub, but easy to access GitHub from Gist. To find your Gist from your GitHub, you need to click on your profile icon, then scroll down to “Your gists” in the dropdown menu. There’s no other place to find it. Additionally, compare your Gist profile and your GitHub profile: If you view your Gist profile, there’s a link to view your GitHub profile right below your profile pic and intro text, but not the other way around. Why? I have no idea, but I feel like this is a kind of annoying flaw.

Also annoyingly, albeit this time because of Slack: You can’t embed a Gist snippet inside a Slack post (instead of creating a code snippet in Slack), but you can include a link to your Gist snippet.

The major benefit of Gist code snippet’s over Slack’s code snippets is that you can use a Gist version anywhere, whereas Slack’s versions can only be used on Slack.

Oldest comments (0)