Note that there are some explanatory texts on larger screens.

plurals
  1. POFork an existing read-only Git repository
    primarykey
    data
    text
    <p>I want to make additions to a Git, so that the original author is able to pull the changes. Normally I'd fork that on something like GitHub and the workflow is simple. However for external repos I did find <a href="http://help.github.com/fork-a-repo/" rel="nofollow">nothing in the documentation</a>. </p> <p>Does anybody know how this would work for an external repository? Here's what I tried:</p> <pre><code>% more .git/config [core] repositoryformatversion = 0 filemode = true bare = false logallrefupdates = true [remote "upstream"] fetch = +refs/heads/*:refs/remotes/origin/* url = git://wiesel.ece.utah.edu/gr-ieee802-15-4.git [branch "master"] remote = origin merge = refs/heads/master [remote "origin"] url = git@github.com:wishi/gr_802.15.4.git fetch = +refs/heads/*:refs/remotes/origin/* </code></pre> <p>upstream is supposed to be the remote repo, and master the <a href="https://github.com/wishi/gr_802.15.4" rel="nofollow">GitHub thingy</a>. So after a trivial first change:</p> <pre><code>% git commit -a -m "check" [master 796f97a] check 1 files changed, 1 insertions(+), 1 deletions(-) % git push origin master To git@github.com:wishi/gr_802.15.4.git ! [rejected] master -&gt; master (non-fast-forward) error: failed to push some refs to 'git@github.com:wishi/gr_802.15.4.git' To prevent you from losing history, non-fast-forward updates were rejected Merge the remote changes before pushing again. See the 'Note about fast-forwards' section of 'git push --help' for details. </code></pre> <p>So that makes sense: merge the two branches:</p> <pre><code>% git merge upstream/master fatal: 'upstream/master' does not point to a commit </code></pre> <p>And here I am...</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

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