使用 git-svn 合并 svn 跟踪分支的正确工作流程是什么。我已经阅读了一些关于 git-svn svn.pushmergeinfo 配置键的信息,注意事项是:
来自http://www.kernel.org/pub/software/scm/git/docs/git-svn.html:
配置键:svn.pushmergeinfo
此选项将导致 git-svn 尝试在可能的情况下自动填充 SVN 存储库中的 svn:mergeinfo 属性。目前,这只能在 dcommitting 非快进合并时完成,其中除了第一个之外的所有父级都已被推入 SVN。
所以我的正常工作流程是:
假设我有一个 SVN 分支 ^/branches/feature_branch
# Ensure git-svn is configured to populate svn:mergeinfo
git config --global svn.pushmergeinfo true
# Update my local svn remotes state
git svn fetch
# Track a local branch against a remote SVN backed ^/branches/feature_branch
git checkout -b local_feature_branch remotes/feature_branch
# Modify files and commit to local git repo
git commit -a -m "changes"
# Push changes to SVN branch ^/branches/feature_branch
git svn dcommit
然后将 ^/trunk 合并到我的 local_feature_branch 中,我假设我做了类似的事情?
# Sync to the latest SVN
git svn fetch
# Rebase "master" which is tracking the remote SVN ^/trunk
git checkout master
git svn rebase
# Checkout the local_feature_branch
git checkout local_feature_branch
# Merge "master" into "local_feature" which is tracking ^/trunk
git merge --squash master
git commit -m "merge master which is tracking SVN ^/trunk"
# Dry run the dcommit to SVN which should include svn:mergeinfo property changes
git svn dcommit --dry-run
# Commit merge to trunk
git svn dcommit