Reputation: 17806
I have a git repo that was initially cloned from an svn repo.
When I tried a
git svn rebase
I'm getting
Unable to determine upstream SVN information from working tree history
I have read pretty much every post here about this error and I tried
git update-ref refs.remotes/git-svn refs/remotes/origin/master
I have also tried
git svn rebase -l
I'm getting
Unable to determine upstream SVN information from working tree history
I am on git 1.7.11 msysgit.1
Thanks for the help :)
Any ideas?
Upvotes: 0
Views: 1875
Reputation: 1011
Did you migrate it with option --no-metadata
?
When I migrate my svn with git svn clone --no-metadata
, I met the error message like you.
But, I re-migrated it without --no-metadata
options, and then I could succeed in git svn rebase
.
Upvotes: 0
Reputation: 2867
git-svn determines your remote repository by looking through your git log for "git-svn-id" entries in the commit messages. It does this using git rev-list --first-parent --pretty=medium HEAD
. The first step to diagnosis is to run that command and inspect the log.
The --first-parent
option tells it which branch to follow if it encounters a merge. It won't follow all branches at that point, so it's likely that a rogue merge is to blame. If that appears to be the case, use git log --graph --all
to identify a "good" revision to roll back to - i.e. the most recent one with a "git-svn-id" in the log message. What to do next depends on what you find!
Upvotes: 1