Skip to content

Instantly share code, notes, and snippets.

@jt
Created August 23, 2011 18:47
Show Gist options
  • Save jt/1166108 to your computer and use it in GitHub Desktop.
Save jt/1166108 to your computer and use it in GitHub Desktop.
Merge a forked gist

If someone forks a gist and you'd like to merge their changes. Do this:

  1. clone your repo, I use the name of the gist

     git clone git://gist.github.com/1163142.git gist-1163142
    
  2. add a remote for the forked gist, I'm using the name of my fellow developer

     git remote add aaron git://gist.github.com/1164196.git
    
  3. pull and merge the new remote into master

     git pull aaron master
    
  4. push the changes

     git push
    
@tobiasmcnulty
Copy link

tobiasmcnulty commented Jun 6, 2019

This doesn't seem quite right. In case it's helpful to anyone else, I add to use a : instead of a / between the domain and the repository, i.e.:

git clone git://gist.github.com:1163142.git gist-1163142`

@dungsaga
Copy link

Another solution is:

git clone [email protected]:2322786.git
git remote add changes git://gist.github.com/2661995.git
git fetch changes
git merge changes/master
git push

See https://stackoverflow.com/questions/10688185/how-to-merge-a-gist-on-github

@SalMaster007
Copy link

How to merge two gist into one gist after regular time interval?

@dungsaga
Copy link

How to merge two gist into one gist after regular time interval?

@SalMaster007 You need a script to automate this. And a scheduler (such as a cron job, a web hook, ...) to run it regularly.

@anonphoenix007
Copy link

Didn't work,maybe I didn't get the steps.

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