When I do git svn rebase
on trunk-svn
(which is my local copy of the SVN repo's trunk
branch), I get the following error:
fatal: invalid upstream 'refs/remotes/origin/trunk'
rebase refs/remotes/origin/trunk: command returned error: 128
On a different branch, I get a different error:
Unable to determine upstream SVN information from working tree history
Checking out a new local copy of a different remote branch (which I had never checked out before) works fine, both the git checkout -b ...
and the git svn rebase
(with subsequent git svn rebase
saying "up to date").
As far as I know, nothing changed about my local repository or the remote—this just started happening one day.
Here is what the SVN bit of .git/config
looks like:
[svn-remote "svn"]
url = svn://foo.bar.com/svn
fetch = REPONAME/trunk:refs/remotes/origin/trunk
branches = REPONAME/branches/*:refs/remotes/origin/*
tags = REPONAME/tags/*:refs/remotes/origin/tags/*
This is the same as what I see when I do a fresh git svn clone -s
of the repo. (I don't want to just use the fresh clone because I have a LOT of unmerged work in my old copy.)
And here are the relevant bits of .git/config
for the branches in question:
[branch "trunk-svn"]
remote = gitlab
merge = refs/heads/trunk-svn
[branch "bugfix-svn"]
remote = gitlab
merge = refs/heads/bugfix-svn
[remote "gitlab"]
url = git@gitlab.company.com:user.name/repo_name.git
fetch = +refs/heads/*:refs/remotes/gitlab/*
Previous troubleshooting attempts have failed:
git update-ref refs/remotes/git-svn refs/remotes/gitlab/trunk-svn
: No apparent output of this command; same error happens withgit svn rebase
ontrunk-svn
.git fsck
(suggested here) shows only dangling trees, commits, and blobs—i.e., nothing appears to be missing.- Removing
.git/svn/.caches
(idea derived from a suggestion here) makes no difference. - Adding
rewriteRoot
andrewriteUUID
as suggested here makes no difference.
Any ideas would be much appreciated! Let me know if I can provide any more info that might be useful.