本文介绍了无法从某些git-svn命令的HEAD历史记录中确定上游SVN信息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我遇到 code>没有问题,之后我遵循。



问题仍然存在。

解决方案

我有这个使用原因。



我有我的项目在Git marcusproject

对于一些策略,我必须管理SVN和Git toghether,所以我决定使用git svn。



Git svn从SVN开始,一个问题,因为我来自一个git项目。



所以




  • 开始从Git我承诺我的项目 my_svn_repo_url

  • 然后在我运行的新文件夹中:



    git svn clone my_svn_repo_url
    (注意:在git svn clone之后,您必须再次添加远程)



    git remote添加源git @ myurlgitrepo:/path/git/marcusproject.git




现在,如果我运行

  git svn info 


$ b

  marco $ git svn info 

路径:
URL: http:// myurl / svn / url / branches / project存储库

根:blablabla存储库UUID:2e790b0d-f755-41c8-864a-d7ceaa3670a7

版本:36

Node Kind:目录Schedule:正常

最后更改:2015-04-16 12:54:19 +0200(Gio,2015年4月16日)

如果我切换到一个git分支已经存在
运行git p ull origin mybranch
并运行git svn info我收到此错误

pre $ 无法确定HEAD历史记录中的上游SVN信息。
也许库是空的。

但是,如果我从新的主
开始创建我的新分支git checkout -b newbranch
都可以正常工作。


所以:
$ b $ ol

  • 将所有提交都推送到git上


  • 迁移到git svn(git svn clone)


  • 忘记在git svn clone之前创建的所有分支

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



    享受

    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.

    解决方案

    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 existsrun git pull origin mybranchand 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 mastergit checkout -b newbranchall 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

    这篇关于无法从某些git-svn命令的HEAD历史记录中确定上游SVN信息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

    09-04 20:28