无法从某些 git-svn 命令中的 HEAD 历史记录确定上游 SVN 信息

发布于 2024-12-18 01:48:06 字数 590 浏览 5 评论 0原文

我有一个 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-core\git-svn line 780.

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

我尝试了另一个主题提供的许多方法,但它从来没有奏效。 :(

我已经尝试过 git fsck 、 git svn rebase -l 了。

我的存储库大约有 20,000 个修订版本。我从 http://localhost 从原始网址同步,之后,我将网址更改为原始网址(在 .git/config 中),更改后我可以运行 git svn fetch 没有问题。 nofollow">此博客。

问题仍然存在。

I have a problem with git svn

For this one, it occurs when try to 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-core\git-svn line 780.

I also have a problem with git svn info which show the same error message.

I try many ways as another topic provided but it never work. :(

I already try git fsck, git svn rebase -l also.

My repository is about 20,000 revisions. I fetched from http://localhost which sync from the original url, and after that, I change the url to the original one (in .git/config), after change I can run git svn fetch without problem. after that I follow this blog.

The problem still occurs.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

清旖 2024-12-25 01:48:06

我有这个用途。

我在 Git ma​​rcusproject 上有我的项目。

对于某些策略,我必须同时管理 SVN 和 Git,因此我决定使用 git svn。

Git svn 从 SVN 开始工作,对我来说这是一个问题,因为我来自 git 项目。

因此,

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

    git svn 克隆 my_svn_repo_url
    (注意:git svn clone之后你必须再次添加远程)

    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.

但是如果我从新的 master 开始创建我的新分支
git checkout -b 新分支
一切正常。

所以:

  1. 将所有提交推送到 git

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

  3. 忘记在“git svn克隆”之前创建的所有分支

  4. 从新开始创建新分支master

您将永远不会看到该错误。

享受

I've this use cause.

I have my project on Git marcusproject.

For some policies I have to manage SVN and Git toghether so I decided to use git svn.

Git svn works starting from SVN and for me It's a problem because I come from a git project.

So

  • Starting from Git I committed my project to my_svn_repo_url
  • Then in a new folder I run:

    git svn clone my_svn_repo_url
    (Note: After git svn clone you have to add again the remote)

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

Now if I run

git svn info

all works fine.

    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)

If I switch to a git branch already exists
run git pull origin mybranch
and the run git svn info i receive this error

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

But if I create my new branch starting from the new master
git checkout -b newbranch
all works fine.

So :

  1. push all your commit on git

  2. migrate to git svn (git svn clone)

  3. forget all your branches created before the "git svn clone"

  4. create new branch starting from new master

You will never see that error.

Enjoy

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文