Why am I getting an error when rebasing?

I have the following situation:

  1. A branch
    master
    ;
  2. A topic branch
    x
    off of
    master
    ;
  3. I have made a commit to
    master
    , and I would like to have this available in
    x
    as well. It is my understanding that I have to rebase
    x
    on
    master
    .


This is what I do:

  1. Checkout the
    x
    branch:
    VCS -> Git -> Branches -> Local branches -> x -> Checkout
    ;
  2. Go to
    VCS -> Git -> Rebase -> Select master in onto
    .
  3. Click Rebase.


At this point an error shows up telling me to check the VC console for details. This is what the console shows:

23:59:22.839: git rebase -i -v -m refs/heads/master
Cannot rebase: You have unstaged changes.
Additionally, your index contains uncommitted changes.
Please commit or stash them.

There are no pending changes in any branch anywhere. Everything is committed (and pushed to Bitbucket if that makes any difference). Am I doing this right? How can I rebase my branch on

master
?

I am trying to do what is described here:
http://jeffkreeftmeijer.com/2010/the-magical-and-not-harmful-rebase/

Same question with no answers on stackoverflow:
http://stackoverflow.com/questions/12133885/intellij-git-rebase-error

The error is not helpful at all and I have no idea how to fix it. I cannot use branching at all without this, any help please?
3 comments
Comment actions Permalink

Please check if you really don't have local unstaged changes. For this, call `git status` from the command line.

Btw, does rebase fail from the command line as well as from the IDE?

0
Comment actions Permalink

That was it, `git status` showed some deleted files that the IDE wasn't tracking for some reason.

I think it would help a lot if the IDE let you have more control over git. For example, it would be nice if you could type commands directly in the IDE VC console. Another thing would be for the IDE to show you the full output of `git status`, at least to accompany errors such as these, if not to build the changes list on.

IDE options for commands like `git reset --hard HEAD` would also be helpful.

Are there any proposals for this I could vote on?

0
Comment actions Permalink

I guess it is the same problem as described in http://youtrack.jetbrains.com/issue/IDEA-76760

As about active Git console please vote for it in http://youtrack.jetbrains.com/issue/IDEA-76252

IDEA has Git -> Reset where you can call `git reset --hard`. The interface is not ideal, but we have plans to improve it.

0

Please sign in to leave a comment.