2011-11-24 83 views
1

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

我也有一個問題與git svn info顯示相同的錯誤消息。

我嘗試了很多方法,因爲提供了另一個主題,但它從來沒有工作。 :(

我已經嘗試git fsckgit svn rebase -l也。

我的倉庫是約20000修訂。我從http://localhost哪個同步從原來的網址,在那之後,我將URL更改爲原來的獲取(以的.git /配置),變更後我可以毫無問題運行git svn fetch。之後,我跟隨this blog

的問題仍然存在。

+0

所以http://stackoverflow.com/questions/1269566/unable-to-determine-upstream-svn-information-from-head-history沒有幫助? – VonC

+0

號沒有幫助。我在最終版本中使用了git和subversion。 TortoiseGit 1.7.4.0,git 1.7.7.1.msysgit.0,TortoiseSVN 1.7.1,Build 22161 - 64位,2011/10/21 22:51:59 Subversion 1.7.1, – scalopus

+0

檢查if Git支持SVN1.7 +,或者,如果可以,降級到SVN1.6 +是否不會產生更好的結果。 – VonC

回答

1

我已經使用這個事業。

我有我的項目Git marcusproject

對於一些政策我必須管理SVN和Git toghether所以我決定使用git svn。

Git svn從SVN和我開始工作這是一個問題,因爲我來自一個git項目。

所以

  • 從Git的開始,我承諾我的項目my_svn_repo_url
  • 然後在一個新的文件夾,我跑:

    混帳svn的克隆my_svn_repo_url (注:git的後svn克隆你必須再次添加遠程)

    git遠程添加原產地的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拉出身mybranch 和運行git SVN信息我收到此錯誤

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

但是,如果我創造我的新的分支從開始新主人 git checkout -b新分支 一切正常。

所以:

  1. 推動所有的git的承諾

  2. 遷移到Git的SVN(GIT SVN克隆)

  3. 忘記 「混帳SVN克隆」 之前創建的所有分支

  4. 創建從新主人開始的新分支

你永遠不會看到那個錯誤。

享受