How to convert files in GitHub repository to a Gist

First of all, note that Gist doesn’t support directories. To import a repository into a gist follow the next steps: Create a new gist and clone it locally (replace the dummy id with your Gist id): git clone [email protected]:792bxxxxxxxxxxxxxxx9.git cd to that gist directory Pull and merge from your GitHub repository: git pull [email protected]:<user>/<repo>.git Push … Read more

How to create a gist on command line

Recently GitHub CLI released. So you can now use it instead. Just install it to your system (https://github.com/cli/cli#installation) The authenticate (it’s pretty simple) gh auth login After you logged in you can simply create a new gist by: gh gist create -d “my test gist” -f some_local_file.txt test_gist For more details you can use help: … Read more

How can I delete a specific revision of a github gist?

Github has a help page about removing sensitive data: http://help.github.com/removing-sensitive-data/ As gists are just git repositories, you should be able to locally clone your gist, do the clean-up there and do a forced push to overwrite the github version with the cleaned repo. Yes, after thinking about it: If <commit> is the commit you want … Read more

How do I get the raw version of a gist from github?

And yet there is, look for the raw button (on the top-right of the source code). The raw URL should look like this: https://gist.githubusercontent.com/{user}/{gist_hash}/raw/{commit_hash}/{file} Note: it is possible to get the latest version by omitting the {commit_hash} part, as shown below: https://gist.githubusercontent.com/{user}/{gist_hash}/raw/{file}

Gist Vs. Repository for Tutorial

Gist is a simple way to share snippets and pastes with others. Whereas Repo is simply a place where the history of your work is stored. There is no good answer, it’s personal preference. I make mine a conceptual distinction. If it’s code designed to demonstrate a technique, teach a principle, or show off a … Read more

View rendered output of a gist?

rawgit.com provides this service. To use rawgit.com, simply replace the domain of the raw view of the gist or github file you want to view with rawgit.com. For example: https://gist.githubusercontent.com/mbostock/844752/raw/index.html to https://rawgit.com/mbostock/844752/raw/index.html or https://raw.githubusercontent.com/caffinatedmonkey/Hello-World-PSP/master/main.cpp to https://rawgit.com/caffinatedmonkey/Hello-World-PSP/master/main.cpp

How to delete a specific revision of a github gist?

Github has a help page about removing sensitive data: http://help.github.com/removing-sensitive-data/ As gists are just git repositories, you should be able to locally clone your gist, do the clean-up there and do a forced push to overwrite the github version with the cleaned repo. Yes, after thinking about it: If <commit> is the commit you want … Read more