1
我跟着this發表了關於如何使用git svn創建和簽出分支的問題,以便實際上在svn回收站上創建分支。這很好。git svn master to branch to master - 仍然試圖提交分支
當我完成了我的分支,我做了一個結賬主,並做了一個git合併。這工作得很好。然後,我去svn回購提交合並回幹,所以發出了一個git svn dcommit。
它試圖提交到分支。儘管我現在已經檢查了主分支。我錯過了什麼?
$ git svn branch -m "test branch" test_branch
$ git checkout --track -b test_branch remotes/test_branch
$ Hack hack hack...
$ git svn dcommit --dry-run # Make sure you're committing to the right SVN branch
$ git svn dcommit # Commit changes to "test_branch" branch in SVN
$ git checkout master
$ git merge test-branch
$ git svn dcommit # why is this committing to the branch instead of trunk??
這是我的.git /配置的情況下,它的事項
[core]
repositoryformatversion = 0
filemode = true
bare = false
logallrefupdates = true
ignorecase = true
[svn-remote "svn"]
url = mysvnrepos.com/svn/project
fetch = trunk:refs/remotes/git-svn
branches = branches/*:refs/remotes/*
[branch "test_branch"]
remote = .
merge = refs/remotes/test_branch
這對未來都很好,但我需要解決現在發生的事情,我顯然沒有做好。 – Gregg
@Gregg'git checkout master; git rebase test_branch'將消除應該恢復順序的合併提交。 – Tobu
它沒有。我做了這兩個命令,然後是一個git svn dcommit --dry-run。仍然說它是承諾我的分支。 – Gregg