9

I'm new to GitHub and have some questions. I'm using the PullToRefreshView project from GitHub. I've created my own Fork. Using the GitHub for Mac, I've synchronized my own fork down to my computer.

On GitHub Gist I found a commit with some changes to one of the files from the original repository: https://gist.github.com/1611706. How can I add this to my own fork?

Matthew Murdoch
  • 30,874
  • 30
  • 96
  • 127
dhrm
  • 14,335
  • 34
  • 117
  • 183

2 Answers2

5

Easy way:

Less easy way:

  • Display in your browser the raw version of the gist
  • Copy the content
  • Open locally the PullToRefreshView.m file
  • Replace its content with the content of the clipboard
  • Stage the new version of the file
  • Commit locally and push (publish) toward your GitHub repo

Note: There are other approaches, but considering the small history of the Gist, they're far too much complex.

Note 2: Please take into account that this change will only exist in your repo, not in the master (chpwn's) repo. You won't be able to transparently benefit from every upstream update, you'll have to merge them.

nulltoken
  • 64,429
  • 20
  • 138
  • 130
  • Ok, so there is no way connect the Gist directly to my repo, without copying their code. Thank you. I'll then use the less easy way. Can I remove your pull from my repo? – dhrm Jan 16 '12 at 21:18
  • 1
    *Ok, so there is no way connect the Gist directly to my repo* -> There are some (see the first note) but they're a bit overkill. *Can I remove your pull from my repo?* -> Just close it :) – nulltoken Jan 16 '12 at 21:26
1

Further recent developments--you can directly import from the github UI.

Community
  • 1
  • 1
abalter
  • 9,663
  • 17
  • 90
  • 145