codewario
codewario

Reputation: 21518

git svn rebase not working but git svn fetch does

I'm having an issue where when I run

git svn rebase

or

git svn rebase -l

nothing happens. However,

git svn fetch

brings down new revisions successfully. This started happening when I used 'gitk' to revert my working copy to a previous revision, then accidentally ran "git reset --hard HEAD" without switching back over to my master branch. Any ideas on how to fix this without re-cloning?

EDIT

'git status' output

# On branch master
# Untracked files:
#   (use "git add <file>..." to include in what will be committed)
#
#       several untracked files
nothing added to commit but untracked files present (use "git add" to track)

'git branch -avv' shows all of my local and remote branches available to me. There is a lot of output, so what exactly should I be looking for?

It is worthy to note that I can fetch new revisions from another branch, it seems that my master branch is what is screwed up.

Upvotes: 1

Views: 1492

Answers (1)

Jack Taylor
Jack Taylor

Reputation: 6237

I had the same problem when my company was migrating the SVN server to a different domain. After I updated the URL in the repo config with git config --edit, git svn fetch worked but git svn rebase didn't do anything and had to be closed with Ctrl+C. (The SVN server was temporarily accessible at both domains.)

My solution was to edit the repo config again to use the old URL, then run git svn rebase, then edit the repo config a third time to use the new URL. After that, running git svn rebase with the new URL worked fine.

I don't know why it worked, but it did. Maybe this will help someone in the same situation.

Upvotes: 1

Related Questions