1

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.

4
  • What you did should not have the effect you describe. How exactly did you "revert to a previous revision"? Also, please post the output of git branch -avv and git status. Commented Sep 17, 2013 at 9:07
  • I used gitk to "Reset master branch to here" on a selected commit, then ran "git reset --hard HEAD" by mistake instead of checking out the HEAD commit. Commented Sep 17, 2013 at 12:42
  • Please read my comment and post the output of the commands. Commented Sep 17, 2013 at 14:04
  • Did you accidentally reset your master's upstream? Try git branch -u master remotes/trunk or something similar. Commented Oct 4, 2013 at 19:05

1 Answer 1

1

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.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.