git svn dcommit 找不到更改并重置头
我对 git-svn 有一个大问题:我需要将我的 git 存储库推送到 svn 服务器,所以我做了以下工作
svn mkdir --parents http://host/path/to/repo/{trunk,tags,branches} \
-m "Standard layout for $project"
git svn init -s http://host/path/to/repo/
git svn fetch
git rebase trunk master
git svn dcommit
,效果很好,一切都在 git 和 svn 上!
现在我收到消息说我的 git master 分支比 origin/master 落后了 31 次提交,所以我做了一个 git pull。 现在我更改了我的存储库中的一些内容(基本上是一个 Eclipse Java 项目)并提交了它。现在我还想将它推送到 svn 存储库并制作一个 git svn dcommit 但这不起作用:
Committing to https://..../trunk ...
No changes
38b194cb2860b8bb73924cb05f9830dbdb70cf82~1 == 38b194cb2860b8bb73924cb05f9830dbdb70cf82
No changes between current HEAD and refs/remotes/trunk
Resetting to the latest refs/remotes/trunk
Unstaged changes after reset:
M Product/Abgabe.tex
Unable to extract revision information from commit daf483ad1333f3589386b87054f4c27fb7ff23cf~1
我做错了什么?现在,master 已重置为之前的提交,现在我需要 git checkout -- Abgabe.tex
和 git pull
以获得正确的版本...
编辑:如果我做了一个 git svn rebase ,每次提交都会得到一长串冲突,所以我把 git rebase --skip 放到最后,然后 dcommted,这是工作,但这似乎是一个该死的黑客:/
I have a big problem with git-svn: I need to just push my git repo to a svn server, so I made the following
svn mkdir --parents http://host/path/to/repo/{trunk,tags,branches} \
-m "Standard layout for $project"
git svn init -s http://host/path/to/repo/
git svn fetch
git rebase trunk master
git svn dcommit
This worked great and everything is both on git and svn!
Now I got the message that my git master branch is 31 commits behind the origin/master, so I made a git pull.
Now I changed some things in my repo (basicily its a eclipse java project) and commited it. Now I want also to push it on the svn repo and made a
git svn dcommit
but thats not working:
Committing to https://..../trunk ...
No changes
38b194cb2860b8bb73924cb05f9830dbdb70cf82~1 == 38b194cb2860b8bb73924cb05f9830dbdb70cf82
No changes between current HEAD and refs/remotes/trunk
Resetting to the latest refs/remotes/trunk
Unstaged changes after reset:
M Product/Abgabe.tex
Unable to extract revision information from commit daf483ad1333f3589386b87054f4c27fb7ff23cf~1
What I did wrong? The master is now reseted to the commit before, now I need to git checkout -- Abgabe.tex
and git pull
to have the right version here...
Edit: If I do a git svn rebase
, I get for every commit a long list of CONFLICTS, so I made git rebase --skip
to the end, and then dcommted, this was working, but it seems to be a bloody hack :/
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我认为您在工作流程中缺少的是 git svn rebase
https://flavio.castelli.me /2007/09/04/如何使用-git-and-svn-together/
I think what you are missing in your work flow is
git svn rebase
https://flavio.castelli.me/2007/09/04/howto-use-git-and-svn-together/