How To Create a GitHub/Gist And Why?
What is a Gist?
This is a new tool that was designed based in share code. You can add your files of code in Gist and copy the URL or the embedded code to share in a web page. This example is code in Gist shared with embedded code:
What you can do with Gist?
You can clone code with HTTPS/SSH, share the link code in order to show the code in GitHub, clone the code, download ZIP files and add a file with the description of the project (HTML or plain text).
What you can´t do with Gist?
You can´t add branches, add people to your project and all the activities related to the development of the project.
What are the differences between Gist and repositories?
Gist is a solution to share code and is a little version of repositories.
How to create a Gist?
You only need to go to the top rigth in your count and select Your Gist.
Now, add description, file (and extention), code, others files and select Public or Secret Gist.
Fields to add your code. the file with extention and description of file
You can share it in a web page.
Code to insert in a web page
What about privacy?
You can create a Public Gist or a Secret Gist, but you need to be aware that all Gist is Public, the only difference is Secret Gists is not available for other people that do not have the URL of the project. In that way, this is not really private.
What do I think about this?
Gist it is a good way to share code but I think the GitHub Team could add these advantages to GitHub repositories. Maybe you want to create a public repository for your web page and after a certain time to add and feature and you can´t do it directly in the repository. Then you need to have the project into platforms: GitHub and Gist.GitHub.
But in another point of view, could be a good idea to have a Gist when you don´t need the features of a repository.
If you have another comment or you think differently about Gist, please leave a comment.
Have a nice coding day! 👦
Last edition date: 12/July/2021.