git-svn tells me file is out of date but rebase doesn't solve it

35 Views Asked by At

I have a Git repository that I want to push to an SVN repository. The SVN repo has a trunk/ and tags/ folder. I set everything up and did a git svn dcommit but it pushed my files to the root folder instead of the trunk folder.

I changed my setup and was able to push to the trunk folder. I then used a pure SVN command to remove the files in the root. So my SVN repo now has an extra revision that Git doesn't know about. (could be important for my question)

Now, I changed a file in Git and when I want to dcommit to SVN, I get the following message (redacted the commits for anonymity):

Item is out of date: File '/my-project/trunk/README.txt' is out of date
W: 38...................................8558 and refs/remotes/git-svn differ, using rebase:
:100644 100644 f3...................................7ae9 f8...................................3c3d M      README.txt
Current branch main is up to date.
ERROR: Not all changes have been committed into SVN, however the committed
ones (if any) seem to be successfully integrated into the working tree.
Please see the above messages for details.

I've tried git svn rebase, git svn rebase git-svn (git-svn is the remote branch name) and it tells me my current branch is up to date. I've also tried git fetch, even git svn reset with an older revision and then the other commands. Whatever I do, I keep getting the message.

As far as I understand it, it's because the remote server contains a change to the file which I don't have yet locally. Which is strange because I don't think it's the case. But even so, a rebase should work then, right?

So what steps do I need to take to solve this?

0

There are 0 best solutions below