Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>You can just add <code>foo/master</code> as a remote, merge it in from time to time (do this in <code>&lt;username&gt;.github.com</code> repo):</p> <pre><code># add foo as remote (once) git remote add foo https://github.com/&lt;username&gt;/foo.git # fetch from remote (often) git fetch foo # merge changes to source (when you want) git checkout source git merge foo/master </code></pre> <p>You can set <code>origin/source</code> as remote for <code>source</code> and <code>origin/master</code> as remote for master as normal.</p> <p>You can also use <code>git fetch --all</code> to update all remotes, including <code>origin</code> and <code>foo</code>.</p> <p>If you don't change much in <code>source</code>, then the merge will almost always be fast-forward.</p> <hr> <p>You might want to set a remote url for foo that is read-only. This way you can't push from <code>&lt;username&gt;.github.com</code> by accident and if it's a public repo, you won't need authentication (or password for your ssh key) for the fetch.</p> <hr> <p>You can keep git from fetching the <code>gh-pages</code> branch with</p> <pre><code>git config remote.foo.fetch "+/refs/heads/master:/refs/remotes/foo/master" git branch -rD foo/gh-pages </code></pre> <p>You just have to remember setting that when you expect any other branches than <code>master</code> to appear from <code>foo</code> remote.</p> <p>A good explanation of the refspec is in the <a href="http://git-scm.com/book/ch9-5.html" rel="nofollow">git book</a></p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload