Skip to content

Instantly share code, notes, and snippets.

@seanhandley
Created July 11, 2012 10:33
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save seanhandley/3089541 to your computer and use it in GitHub Desktop.
Save seanhandley/3089541 to your computer and use it in GitHub Desktop.
Gists - The second class citizens of Github

Gists - The second class citizens of Github

So, let me start by saying that gists are awesome. There's no faster, simpler way for me to share code snippts with syntax highlighting for all to see, clone, comment on and assist with.

Marvellous.

But something has been bothering me about gists for some time. A "Gist" in Github parlance, is a git repository backed file (or set of files) which can be edited in the browser by the owner and commented on by other users. Each edit is a github commit (with a commit SHA) and you can link people to different versions of a diff via a URL.

What I wish you could do is link people to diffs themselves, as you can with a full github repository.

github.com/user/repo/compare/SHA_FROM...SHA_TO

The above will give you the highlighted diff of changes between any two commits in a way you can easily share and refer to.

Why not make this possible with a gist? Often times people will link me their gist code and I will try to help solve their problem. This involves forking it then editing my copy and linking them to my changes. Useful, but they only see my new version - not the individual line changes.

If I clone the gist repo and push it to github as a full repo on my profile then I can achieve this but it seems a little clunky and excessive. There are browser extensions that will let you diff gists but again, it seems like overkill.

Why not bring the full repo API to gists so we can treat them like first-class citizens?

@cbetta
Copy link

cbetta commented Jul 11, 2012

Well that must be what their 100 million is going to be spend on ;)

@seanhandley
Copy link
Author

Let's hope so ;-)

@benjarrell
Copy link

Agreed, very annoying not to be able to see and compare revisions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment