Skip to content

Instantly share code, notes, and snippets.

@dungsaga
Forked from jt/merge.md
Created June 10, 2022 10:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dungsaga/b0d3da06793b9f0e183f8dba0516d86b to your computer and use it in GitHub Desktop.
Save dungsaga/b0d3da06793b9f0e183f8dba0516d86b 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
    
@dungsaga
Copy link
Author

Another solution is:

git clone git@gist.github.com: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

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