What is a github for github?

21

What is the purpose of a gists in github ?

How does it differ to a repository?

    
asked by anonymous 30.07.2015 / 15:23

4 answers

19

With gists you can share single files or part of codes and even entire applications, it is similar to pastebin, however each Gist supports multiple files.

Gists are GIT repositories, so you can see all commits and full modifications, you 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 . In addition, if you are not logged in to github you can create a gist, it will be an anonymous gist .

  • Public gists (public gist)

    Public gists can be viewed and found, they will be searchable, other people can use their gist as much as you can use theirs, and if you like someone else's work over your job (fork of your work) you you can also use it.

  • Secret gists

    Secret gists can not be found by other people,

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

    Secret gists are not counted as "secret repositories," so you can create as many gists as you like.

      

    Attention: Secret Gists are not private. If you send the secret gists URL to someone they can view it. If you want even urls to be private, you will need to create a repository in 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 may be public or secret. However to delete it you will need to contact Github support or the administrator of your site. In this case you should arrange the url of the gist to be able to delete it.

Find and find other people's gists

You can find other people's gists as you go to link , you can search by age of creation, last update, and language. For this you can use the search engine at link and use the query syntax link

Embarking and downloading the Gist

You can upload a gist, in a text field that supports JavaScript, as a blog post. To get the embedded code click on the clipboard icon where Embed Url is written, as in the image:

Thenjustpasteitintothetextfieldofyourblogforexample.YoucanalsocopytheURLoftheGistandevendownloadorcloneitbyclickingtheDownloadGistandCloneGistbuttonsrespectivelyasintheimage.

Source: link

    
30.07.2015 / 20:01
10

Gists are used to keep pieces of code (snippets) that are not specific to any application or are not so important to have a repository just for them. People often use gists to share (or keep in a single place) codes that they use with a certain frequency. Imagine you have a piece of code that you know you will 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 other people) anywhere you are. It's basically pastebin, but with the version control feature.

    
30.07.2015 / 15:40
5

GitHub is the entire site. Gists are a certain service offered on the site, ie snippets of code similar to pastebin. However, everything is driven by git revision control, so gists also have full revision histories.

To learn more, see = link

    
30.07.2015 / 15:38
5

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.

Imagine that you have some snippet of code that you want to save 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 to make an Ajax call using JQuery.

Gists can be public or private. An important detail is that they are Git repositories in their essence.

    
30.07.2015 / 15:42