12
如何使用git-svn和github跟蹤上游SVN更改?使用git-svn和github跟蹤上游svn更改?
我以前的git-svn的轉換一個SVN回購與git 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
然後我改變了我的git回購,犯了一些變化,並推到github上。
現在,我在一臺新機器上。我想採取上游SVN更改,將它們與我的github回購合併,並將它們推送到我的github回購。 This documentation說:「如果你失去了你的本地副本,只需再次使用相同的設置再次運行導入,你將得到所有必要的SVN元信息的另一個工作目錄。」
所以我做了以下。但是沒有一個命令按照需要工作。如何使用git-svn和github跟蹤上游SVN更改?我究竟做錯了什麼?
$ 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