git svn clone> git svn rebase>无法确定工作树历史记录中的上游SVN信息 [英] git svn clone > git svn rebase > Unable to determine upstream SVN information from working tree history

查看:209
本文介绍了git svn clone> git svn rebase>无法确定工作树历史记录中的上游SVN信息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图将一个只读的结帐,http://googleappengine.googlecode.com/svn/trunk/python保存为git存储库,该存储库在远程存储在github中。



1)$ git svn clone http://googleappengine.googlecode.com / svn / trunk / python



2)$ git svn rebase
$ b - Unable从工作树历史记录中确定上游SVN信息所以我开始审查.git / config文件来解决这个问题,而这正是我所处的地方:



[svn-remotesvn]

fetch =:refs / remotes / git-svn

url = http://googleappengine.googlecode.com/svn/trunk/python



[远程起源]

fetch = + refs / heads / :refs / remotes / origin /

url = git@github.com:... PRIVATE_URL ...



[branch'master ]

remote = origin

merge = refs / heads / master



我只需要最后一次获取并合并提交,然后将更改推送到github。
我一直在寻找解决方案,但目前为止我还没有找到解决方案,所以任何指针都会有帮助。


预先感谢:)

解决方案

最好的办法是克隆整个repo(即使它获取了当前不需要的java东西) p>

git svn clone -s http://googleappengine.googlecode。 com / svn /



( - 表示您有标准布局,分支,标签和中继在适当命名的目录中)。



以任何其他方式执行此操作将会非常复杂,因为您希望映射为分支的内容将存在于像branches / 1.1 / python branches / 1.2.1 / python等目录中,并且据我所知,git-svn不会接受格式分支的指定/ * / python


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 :)

解决方案

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

这篇关于git svn clone> git svn rebase>无法确定工作树历史记录中的上游SVN信息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆