Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can I make a pull request on a gist on GitHub?

People also ask

Can anyone create a pull request on GitHub?

Anyone with read access to a repository can create a pull request. If you want to create a new branch for your pull request and do not have write permissions to the repository, you can fork the repository first. For more information, see "Creating a pull request from a fork" and "About forks."

Can you fork a gist?

Gists are actually Git repositories, which means that you can fork or clone any gist, even if you aren't the original author.

Can you create a pull request from Git?

You can create an issue or pull request to propose and collaborate on changes to a repository. Anyone can create an issue in a public repository that has issues enabled. Anyone with read permissions to a repository can create a pull request, but you must have write permissions to create a branch.


You cannot currently open a pull request on a Gist.

You can comment though on the Gist and ask the author to update the Gist from your fork.


As @Kevin said, unfortunately GitHub doesn't expose a GUI for pull requests on gists. You can however fork the gist, make your changes in the fork, then share a link to your fork with the original author.

If the original author is keeping a local cloned repository of their gist (see How do you manage your gists on github?) then they can do a pull against your fork as a remote using the gist # (e.g. git://gist.github.com/1131276).


I have sent a feature request email to [email protected] and pointed to this question.

Ivan Žužak replied with the usual:

I've added that to our feature request list so that the team can consider it.

confirming it is not possible.

Let's keep upvoting this question until it happens.

I recommend instead creating one regular repo called gists and ordering your gists into regular folders.


I don't think it is appropriate to have pull request on gists. The intent of gist.github.com was to improve upon the pastebin concept commonly used in IRC and forums. They chose to call the service "gist" because as vocabulary.com describes it...

When you need a quick summary of the essentials, rather than the whole story or a thorough explanation, you're looking for the gist.

However I will concede that github is missing a very important feature. The ability to create a full github repo out of a gist and keep metadata about its origins.

That would solve most of what people need. At that point, the only form of "request" that someone would need to submit is "hey, won't you make a full repo out of this." And that can be done in the comments. By NOT allowing pull requests, issues, etc. on gists, it allows the author to reply to such a comment with, "nah, it was just a hack I threw together and don't intend to support."

StackOverflow won't let you link to pastebin without including a code block. Done.

Pulling Gists isn't possible in the same manner as git pull, one could provide the changes via Gist in the form of a .diff/.patch. This can be done locally in your working directory with diff or via GitHub if it's already forked there:

  • Original: https://github.com/eternicode/bootstrap-datepicker/commit/c6f93eeab2
  • diff: https://github.com/eternicode/bootstrap-datepicker/commit/c6f93eeab2.diff
  • patch: https://github.com/eternicode/bootstrap-datepicker/commit/c6f93eeab2.patch

This way, it's differential and a lot easier to view/apply the changes, especially if it affects multiple files.