问题
I am trying to keep a read-only checkout of ,http://googleappengine.googlecode.com/svn/trunk/python into a git repository, which is stored as remote in github.
1) $git svn clone http://googleappengine.googlecode.com/svn/trunk/python.
2) $git svn rebase
-- Unable to determine upstream SVN information from working tree history
So I started reviewing the .git/config file to fix this problem, and this where I am at:
[svn-remote "svn"]
fetch = :refs/remotes/git-svn
url = http://googleappengine.googlecode.com/svn/trunk/python
[remote "origin"]
fetch = +refs/heads/:refs/remotes/origin/
url = git@github.com:...PRIVATE_URL...
[branch "master"]
remote = origin
merge = refs/heads/master
My only need is to fetch and merge last commit, and then push the changes to github. I've been looking for solutions and none seem to work for me so far, any pointers would be helpful.
Thanks in advance :)
回答1:
The best thing to do is clone the entire repo (even if it gets the java stuff you don't currently want):
git svn clone -s http://googleappengine.googlecode.com/svn/
(-s states that you have a standard layout, with branches, tags and trunk in appropriately named directories).
Doing it any other way will be complicated, because what you'll want to map as your branches will exist in directories like branches/1.1/python branches/1.2.1/python etc, and as far as i can tell git-svn won't accept a specification of the form branches/*/python
来源:https://stackoverflow.com/questions/5965486/git-svn-clone-git-svn-rebase-unable-to-determine-upstream-svn-information-fr