在一些git-svn命令中,无法从HEAD历史中确定上游SVN信息



我对git svn有一个问题

对于这个,当尝试git svn dcommit

时发生
Unable to determine upstream SVN information from HEAD history.
Perhaps the repository is empty. at C:Program Files (x86)Git/libexec/git-coregit-svn line 780.

我也有一个问题与git svn info显示相同的错误信息。

我尝试了许多方法作为另一个主题提供,但它从来没有工作。(

我已经尝试了git fsck, git svn rebase -l也。

我的存储库大约有20,000个版本。我从http://localhost获取了原始url的同步,之后,我将url更改为原始url(在.git/config中),更改后我可以运行git svn fetch没有问题。之后我关注这个博客。

问题仍然存在

我有这个用途。

我在Git上有我的项目marcusproject

对于某些策略,我必须同时管理SVN和Git,所以我决定使用Git SVN。

Git svn works from svn,对我来说这是一个问题,因为我来自一个Git项目。

    从Git开始,我把项目提交到my_svn_repo_url
  • 然后在新文件夹中运行:

    git svn clone my_svn repo_url(注意:在git svn clone之后,你必须再次添加remote)

    git remote add origin git@myurlgitrepo:/path/git/marcusproject.git

现在如果我运行

git svn info

一切正常

    marco$ git svn info 
Path: 
 URL: http://myurl/svn/url/branches/project Repository 
Root: blablabla Repository UUID: 2e790b0d-f755-41c8-864a-d7ceaa3670a7 
Revision: 36 
Node Kind: directory Schedule: normal
 Last Changed Author: author 
Last Changed Rev: 36 
Last Changed Date: 2015-04-16 12:54:19 +0200 (Gio, 16 Apr 2015)

如果我切换到一个git分支已经存在运行git pull origin mybranch并且在运行git SVN info时我收到这个错误

Unable to determine upstream SVN information from HEAD history.
Perhaps the repository is empty.

但是如果我从新的主节点开始创建新的分支Git checkout -b newbranch一切正常

:

  1. 迁移到git svn (git svn clone)

  2. 忘记在"git svn clone"之前创建的所有分支

  3. 创建新的分支

你永远不会看到这个错误。

享受

最新更新