GitHub: Is it possible to collaborate with someone on a private gist?

No. Your friend should fork the repo, and make her changes there.

You can then merge in your friend’s commits by:

  1. Clone your gist repo locally
  2. Add your friend’s fork as a remote
    1. e.g. if your friend is named Cindy: git remote add-url cindy https://gist.github.com/cindy/df03bdacaef75a80f310
  3. Fetch your friend’s commits: git fetch cindy/master
  4. Merge your friend’s changes into your repo: git merge cindy/master
  5. Push the changes back to GitHub: git push origin/master

2010: I am not sure it is possible.
To make a gist public (which is not what you want, but illustrates the lack of management features around gist), the only solution was to re-post it.

There doesn't seem to be a GUI for adding public ssh key for collaborators, like there is for a GitHub project.


Since my original answer in 2010, the ability to fork a gist (as mentioned in Avi Flax's answer) was added (around 2014-2015).

Each gist indicates which forks have activity, making it easy to find interesting changes from coworkers or complete strangers.

Gist forks -- https://help.github.com/assets/images/help/gist/gist_forks.png

See for instance "A basic collaboration workflow on Gist" (Apr. 2015) from Giovanni Cappellotto (potomak on GitHub).

There is no direct pull request supported though (still valid in 2020).


Avi's approach is right, but the commands did not work for me. Using the same example Avi started, after I cloned my repo, I ran these commands from inside the gist repo directory:

$ git remote add cindy https://gist.github.com/cindy/df03bdacaef75a80f310
$ git fetch cindy master
$ git merge cindy/master
$ git push origin master

I wrote up a more detailed process for collaborating on gists here.