What good is a gists on the github?

Asked

Viewed 8,564 times

26

What is the purpose of a gists in the github?

Where it differentiates into a repository?

  • 1

    I can’t ask that here?

  • 10

    I think they voted to close, for a common reason in other SE communities, lack of prior research, I personally disagree, because the question may be useful, since we usually do not have sources in Portuguese on the subject :) +1

  • 1

    You can also use Gist to save important settings files. I use for example to save my Visual Studio Code extensions.

4 answers

28


With gists you can share unique files or part of code and even entire applications, it is similar to Pastebin, yet each Gist accepts multiple files.

Gists are Gits repositories, so you can see all commits and complete modifications, can clone and make Forks. For more details see "Forking and Cloning gists".

Types of Gists

There are two types of gists, public gists and secret gists. Additionally, if you are not logged in to github you can create a gist, it will be a gist anonimo.

  • Public gists (gist publico)

    Public gists can be viewed and found, they will be searchable, other people can use your gist as much as you can use theirs and if you like someone else’s work on top of a job of yours (Fork of your work) you can also use it.

  • Secret gists (secret gist)

    Secret gists cannot be found by other people,

    You can use to create things, make notes without sharing, as it is not visible to other people in searches.

    Secret gists are not part of the "secret repositories" count, so you can create as many.

    Heed: Secret Gists are not private. If you send the secret gists URL to someone they can view. If you want even urls to be private, you’ll need to create a repository on Github instead of a gist.

  • Anonymous gists (anonymous gist)

    You can create a gist without being logged in to Github, it will be anonymous and can be public or secret. However, in order to delete it, you will need to contact Github support or your website administrator. In this case you must provide the gist url to delete it.

Find and find other people’s gists

You can find other people’s gists when you go up to access https://gist.github.com/discover, you can search by age of creation, last update and language. For this you can use the search https://gist.github.com/search and use query syntax https://help.github.com/articles/searching-code/

Uploading and downloading Gist

You can embark on a gist, in a text field that supports Javascript, such as a blog post. To get the embedded code click on the Clipboard icon where it is written Embed Url, as in the image:

embed gist

Then just paste it into the text field of your blog for example. You can also copy the Gist URL and even download or clone it by clicking the buttons Download Gist and Clone Gist respectively, as in the image.

Source: https://help.github.com/articles/about-gists/

10

Gists are used to keep chunks of code (snippets) that are not specific to any application or are not so important to have a repository just for them. Usually people use the gists to share (or maintain in a single location) codes that they use with a certain frequency. Imagine you have a piece of code that you know you’ll use later (or want to keep saved for some reason), but it’s not worth creating a new repository to keep it safe and you want it to be available to you (or others) anywhere you may be. It’s basically Pastebin, only with the version control feature.

7

Gists can be used to share snippets of code, an entire file, or even entire applications.

They are widely used to share snippets of code (known in English as snippets).

Imagine you have some piece of code that you want to store to access anywhere. Example: How to make an ajax call using Jquery.

In this case, you create a Gist in your Github account and write the code you want to store. That way, wherever you are you can access and see how an Ajax call is made using Jquery.

Gists can be public or private. An important detail is that they are Git representations at their core.

6

Github is the whole site. Gists are a particular service offered on the site , ie code snippets similar to Pastebin . However, everything is driven by git revision control, so gists also have full revision histories.

to learn more, see = https://gist.github.com/

Browser other questions tagged

You are not signed in. Login or sign up in order to post.