提交到svn unstages上次提交?

时间:2011-08-24 13:28:40

标签: git svn dcommit

今天,当我将我的主HEAD“dcommitting”到谷歌代码svn存储库时,我遇到了一个奇怪的问题。下面是我所做的摘录。我差点说我确实有冲突,但我认为这不太可能。我对git越来越有经验,但有时候我仍然感到困惑......

我的演讲分支中的一些变化......

jerry [~/dev/myproject]$git checkout master
Switched to branch 'master'
jerry [~/dev/myproject]$git merge presentation
Updating c5e5816..f5a376c
Fast-forward
 js/iPath.js        |    5 +----
 presentation/paper.html |    6 ++++--
 2 files changed, 5 insertions(+), 6 deletions(-)

现在更改为主

jerry [~/dev/myproject]$git status
# On branch master
# Untracked files:
#   presentation/.#paper.html
nothing added to commit but untracked files present (use "git add" to track)

现在我不得不svn。

jerry [~/dev/myproject]$git svn fetch
jerry [~/dev/myproject]$git svn dcommit
Committing to https://myproject.googlecode.com/svn/trunk ...
No changes
8e67cdc7e8bad816e402c1b9c72b5e84c492e907~1 == 8e67cdc7e8bad816e402c1b9c72b5e84c492e907
No changes between current HEAD and refs/remotes/trunk
Resetting to the latest refs/remotes/trunk
Unstaged changes after reset:
M   js/iPath.js
M   presentation/paper.html
Unable to extract revision information  from commit f5a376ca4a10a4807abbbea131b94b828ee88269~1

svn trunk未经修改,我的最新签到(从演示文稿合并)未分阶段:

jerry [~/dev/project]$git status
# On branch master
# Changed but not updated:
#   (use "git add <file>..." to update what will be committed)
#   (use "git checkout -- <file>..." to discard changes in working directory)
#
#   modified:   js/iPath.js
#   modified:   presentation/paper.html
#
# Untracked files:
#   (use "git add <file>..." to include in what will be committed)
#
#   presentation/.#paper.html

上次提交也会从git日志中删除。发生了什么事?

1 个答案:

答案 0 :(得分:2)

你不能dcommit“git-merges”,因为subversion没有与git(以及任何其他dvcs:parent tracking)相同的合并概念。最近的版本试图用svn:merge-info属性来模拟它,但它不一样。

如果你想让你的dev分支更改为dcommit subversion,你必须先在master上重新定义它们:

git rebase master dev

那么你应该能够dcommit