我正在使用SubGit来同步 Git 和 SVN 存储库。克隆远程 Git 存储库时,我想保留该存储库的所有历史记录。我目前遵循的步骤仅允许我复制主分支的历史记录:
svnadmin create svn_repos
subgit-1.0.0-EAP_1381/bin/subgit configure svn_repos
subgit-1.0.0-EAP_1381/bin/subgit install svn_repos
git clone svn_repos gitRepo
cd gitRepo/
git remote add -f newRemote git://127.0.0.1/gitRepo
...
From git://127.0.0.1/gitRepo
* [new branch] FirstProductionTag -> newRemote/FirstProductionTag
* [new branch] SecondProductionTag -> newRemote/SecondProductionTag
* [new branch] ThirdProductionTag -> newRemote/ThirdProductionTag
* [new branch] bugfix -> newRemote/bugfix
* [new branch] bugfix2 -> newRemote/bugfix2
* [new branch] master -> newRemote/master
git merge -s ours --no-commit newRemote/master
git read-tree --prefix=foo/bar/ -u newRemote/master
git commit -m "Merged new Remote into subdirectory /foo/bar"
git push origin master
如何同时合并来自 bugfix 和 bugfix2 分支的更改?谢谢!