以下是我想做的事。有没有可能
没有其他人会承诺svn回购。只有一个方向。从git到svn。它只会对git进行更改,并将它们添加到svn中。svn基本上是主分支的svn版本。
我以为我可以
git svn dcommit一遍又一遍地,如在
..edit, push and or pull files..
git commit -a -m "foo1"
git svn dcommit
..edit, push and or pull files..
git commit -a -m "foo1"
git svn dcommit
..edit, push and or pull files..
git commit -a -m "foo1"
git svn dcommit但这似乎行不通。我不断收到这样的冲突和信息
$ git svn dcommit
Committing to https://my.svn.repo/svn/ ...
M README.md
Committed r18619
M README.md
r18619 = 8f00073a3f1987e97a0f0f194798b6e02e9b0345 (refs/remotes/git-svn)
No changes between current HEAD and refs/remotes/git-svn
Resetting to the latest refs/remotes/git-svn
Unstaged changes after reset:
M README.md
M README.md
Committed r18620
M README.md
r18620 = 47313477c1e38959fadd43d0001ff55210637669 (refs/remotes/git-svn)
No changes between current HEAD and refs/remotes/git-svn
Resetting to the latest refs/remotes/git-svn看上去很可疑。git状态给了我
# On branch master
# Your branch and 'origin/master' have diverged,
# and have 2 and 2 different commits each, respectively.
#我觉得我从根本上错过了什么。好像我根本不应该使用git-svn。事实上,如果我所做的只是
cd ~/git-folder
..edit files..
git commit -a -m "foo"
cd ~/svn-folder
cp -r ~/git-folder .
svn commit -m "foo"实际上,我会丢失所有的提交消息和单独的提交。
有人能指出我错过了什么吗?
发布于 2012-07-25 08:08:43
一切都很好。在“源/母”和git-svn之间没有任何关系,它使用refs/remotes/git-svn来反映SVN状态。由于git-svn不触及“原产地/母版”,而是用(通常)相同内容的提交替换“master”中的提交,但在提交消息中使用"git-svn-id“签名(因此sha-1散列是这样更改的),所以”master“和”so/master“出现了分歧。
发布于 2012-07-25 04:05:03
在我看来,来自git svn dcommit的输出很好,它只是在SVN存储库中重新创建Git提交。如果您svn co SVN存储库,您将看到同样的提交。
我怀疑您已经从其他地方克隆了Git存储库,或者已经推送了存储库,这一点可以从您有一个origin/master分支的事实中看出;git分支不是在origin远程环境下添加的。
换句话说,我没有看到任何东西会引起恐慌。一切似乎都如期而至。
https://stackoverflow.com/questions/11642487
复制相似问题