9

Attempting to start a bisect with the following command,

git bisect start

causes Git to respond:

fatal: invalid reference: atrium-3018

What is the cause of this and how can I fix it?

jub0bs
  • 60,866
  • 25
  • 183
  • 186
ErichBSchulz
  • 15,047
  • 5
  • 57
  • 61

2 Answers2

14

Apparent this is due to relics of a pevious bisect, that you can resolve with a simple:

rm .git/BISECT_*

(Thanks to Christian for the tip)

Edit - I haven't tested this - but it seems from the doco the more correct response maybe

git bisect reset

If anyone else hit this they may want to try the proper approach and report the outcome)

ErichBSchulz
  • 15,047
  • 5
  • 57
  • 61
  • 3
    I've just had the same issue when trying to cancel an old bisect using the `git bisect reset` command you mentioned. Your suggestion about removing the temporary files fixed it for me :) – Dan Feb 21 '15 at 11:01
0

For me, I got this error because of a months-old git bisect session. The branch which it had started had long been deleted.

My solution was to do

git bisect reset <branch name>

where <branch name> was a branch that actually exists in my local repo.

Alternatively, I imagine you can just create a new branch with the same name as the one git bisect reset is complaining about.

Code-Apprentice
  • 81,660
  • 23
  • 145
  • 268