Getting into GitHub Gist
Gist? It’s already a lot of concepts on GitHub and now we’re adding one more thing to learn out!?
Actually a BIG NO !, it is making our lives simply easier.
Ok So, what’s that GitHub Gist?
The gist is a method that is actually very easy, to share our code snippet with others.
Hnn? Only Code? Actually no, you can share a piece of the data which can be anything, to others.
Will that sharing piece be private or public?
A gist can be either public or secret. If you are logged in to GitHub when you create a gist, it will show up in your dashboard. You can also drag and drop a file onto your gist editor and it will be added.
Fun fact : Not only it is free but it is definitely easy to create.
So we have got some intro to GitHub Gist so now let us get into ‘How to create one?’
Step 1. Get onto github.com and click New Gist option from New Drawer.
Now you’re welcomed to the GitHub Gist pages to create new one.
Step 2. Give some discription of about the gist you’re creating on.
Step 3. Now, you can provide the filename you want with the extension of the file type you’re associating with.
Step 4. Type some sort of code into the input field.
P.S -> Remeber to code the same you’ve associated the extension type.
Step 5. Hurray !! Now it’s the time to publish the code for peeps around the world. So now you have two options, one is to make the gist public so that everyone can enjoy or secret so to make it as a note for yourself.
So let’s make this gist public for this blog.
Step 6: So now, you’ve created your gist and it is published, can be shared among the peers.
For sharing it among the peers, you can copy down the link from slide down options.
Now let’s take a short real time example :
Suppose we’re to share some data using tables all over the internet so here the GitHub Gists comes in play.
- As of now, I’m creating a new gist with name blogs.md, a markdown file which will contain my blogs name and link.
Well gist also provides the preview of upcoming markdown file.
2. Filling all the details for blogs.
3. Looking out for being public gist or secert. As of now public because we do want to share the blogs in folks and search engine do look for it.
4. Since I’ve published my blog.md publicly so everyone will be able to search and find my resources for blogs.
Preview of my Gist if someone took out my shared link and tried to reach me.
Some points to be considered for GitHub Gist :
1. You can clone the gist into your local repository and edit the markdown and push it again for revision
2. Certainly there is no provision for Pull Request so one have to comment to get the things updated.
Link to my blog.md :
https://gist.github.com/TauqeerAhmad5201/b3a4d3aa5cbe763eb6f5212a5079e70e
Hope you will be using GitHub Gist more as of now for sharing the pile of data or code over internet making things rapid.