Generally speaking, you don't want to do that.  git-svn is great for working
locally in git and pushing back to an svn repo, or importing (one time) svn
to git... but maintaining a two-way mirror will become a huge headache
because of the way svn works.  If the owner of the svn repo isn't willing to
move to git then your best best is to just use git-svn locally and not push
the repo to github.

On Sun, May 9, 2010 at 2:57 PM, Joseph Turian <[email protected]> wrote:

>
>
> How do I track upstream SVN changes using git-svn and github?
>
> I used git-svn to convert an SVN repo to git on github:
>
> $ git svn clone -s  http://svn.osqa.net/svnroot/osqa/ osqa
> $ cd osqa
> $ git remote add origin [email protected]:turian/osqa.git
> $ git push origin master
>
> I then made a few changes in my git repo, committed, and pushed to
> github.
>
> Now, I am on a new machine. I want to take upstream SVN changes, merge
> them with my github repo, and push them to my github repo. This
> documentation says: "If you ever lose your local copy, just run the
> import again with the same settings, and you’ll get another working
> directory with all the necessary SVN metainfo."
>
> So I did the following. But none of the commands work as desired. How
> do I track upstream SVN changes using git-svn and github? What am I
> doing wrong?
>
> $ git svn clone -s  http://svn.osqa.net/svnroot/osqa/ osqa
> $ cd osqa
> $ git remote add origin [email protected]:turian/osqa.git
> $ git push origin master
> To [email protected]:turian/osqa.git
>  ! [rejected]        master -> master (non-fast forward)
> error: failed to push some refs to '[email protected]:turian/osqa.git'
> $ git pull
> remote: Counting objects: 21, done.
> remote: Compressing objects: 100% (17/17), done.
> remote: Total 17 (delta 7), reused 9 (delta 0)
> Unpacking objects: 100% (17/17), done.
> From [email protected]:turian/osqa
>  * [new branch]      master     -> origin/master
> From [email protected]:turian/osqa
>  * [new tag]         master     -> master
> You asked me to pull without telling me which branch you
> want to merge with, and 'branch.master.merge' in
> your configuration file does not tell me either.  Please
> name which branch you want to merge on the command line and
> try again (e.g. 'git pull <repository> <refspec>').
> See git-pull(1) for details on the refspec.
> ...
> $ /usr//lib/git-core/git-svn rebase
> warning: refname 'master' is ambiguous.
> First, rewinding head to replay your work on top of it...
> Applying: Added forum/management/commands/dumpsettings.py
> error: Ref refs/heads/master is at
> 6acd747f95aef6d9bce37f86798a32c14e04b82e but expected
> a7109d94d813b20c230a029ecd67801e6067a452
> fatal: Cannot lock the ref 'refs/heads/master'.
> Could not move back to refs/heads/master
> rebase refs/remotes/trunk: command returned error: 1
>
> --
> You received this message because you are subscribed to the Google Groups
> "GitHub" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected]<github%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/github?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"GitHub" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/github?hl=en.

Reply via email to