ブランチを作成してチェックアウトする方法については、thisの投稿に従ってください。ブランチがgit svnを使って実際にsvn reposに作成されました。これはうまくいった。git svnマスターにブランチするにはまだブランチにコミットしよう
私が支店で作業したとき、私はマスターでチェックアウトを行い、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??
これは、それが
[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