May be most of the people aware - what is 'Github gist'.
But I was not aware and explore it recently.
So thought of sharing few details with others.
if you want to share your code or some writing - What are the options you have?
- Either you share via email in text file.
- or upload in Google Drive
- or Paste the code in pastebin or other websites available.
But we can share it also using 'github gist' - it has so many advantages
Gist is an easy method to share snippets or piece of data with others.
Step 1
Open https://github.com/
On the top right hand side drop down list you will see option 'New gist'
Click on it
it will redirect you to https://gist.github.com/
You can directly open this URL as well
you will see below page.
Step 2
In gist.github.com page, you will see multiple options
- You can view your all gist created by you by clickinig on 'View your gists' on top right corner.
- you can create new gist. [You can create either Secret gist or Public gist]
Step 3
Let's write some code and create gist, give some description to your gist (example Demo gist)
Give Name of your file = demo.py (Give file extension - it Text Box will then automatically recognize language, else by default it will take as a txt file]
After creating, we can view our created gist
If we will not give file name - github gist - assign some random file itself as shown below.
I did not mention filename - See some random name automatically given by github gist. Also this gist i created as a public - Thus we will not able to see 'Secret' symbol in front of file name
Viewing gist commit history
To view a gist's full commit history, click the "Revisions" tab at the top of the gist.
Cloning gists
If you want to make local changes to a gist and push them up to the web, you can clone a gist and make commits the same as you would with any Git repository.