1

I tried to run a bisect to locate an issue and when it's done I called git bisect reset:

$ git bisect reset
We are not bisecting.

But then the label of good is still there, how can I remove this label? It shows something like this in git log:

commit c561e7297... (good)
fluter
  • 13,238
  • 8
  • 62
  • 100
  • You might be using `git bisect` incorrectly. Please show the exact commands you used before you tried to run `git bisect reset`. – Tim Biegeleisen Jan 08 '19 at 01:49
  • I run `git bisect start` then `git bisect good` then several `good and bad` commands, then finally run `reset`. – fluter Jan 08 '19 at 01:54
  • Oops, never mind previous (deleted) comment, you're using reset correctly. Anyway, there's no issue with leaving the `good` label around—it's just a label. – torek Jan 08 '19 at 03:27
  • @torek it gives wrong impression that this commit is good, so i wanna get rid of it :) – fluter Jan 08 '19 at 04:00
  • Normally `git bisect reset` should clean out `refs/bisect/` which should get rid of it. You could run `git for-each-ref --format='%(refname)' refs/bisect | xargs git update-ref -d` to delete them all, or just `git update-ref -d refs/bisect/good` to delete the `good` one. – torek Jan 08 '19 at 05:58
  • Hmm, this is weird, because this is no `refs/bisect/good` in `.git`, `refs/bisect` is empty. – fluter Jan 08 '19 at 06:04
  • Hmm, i just found there is `refs/heads/good`... – fluter Jan 08 '19 at 06:05

1 Answers1

0

You said:

I run git bisect start then git bisect good

From the documentation, here is the procedure you should follow when using git bisect:

$ git bisect start
$ git bisect bad        # mark current commit as bad
$ git bisect good v1.0  # mark some earlier commit as good

Git bisect basically just does a binary search to find the first bad commit where some problem popped up in your branch. It expects you to mark a certain commit as good, then some earlier commit as bad. Because you marked the current commit as good first, without specifying a bad commit, my guess is that bisect just completed without doing anything.

Tim Biegeleisen
  • 502,043
  • 27
  • 286
  • 360
  • I don't think that `(good)` is actually a permanent part of the history. It should go away on its own AFAIK, after running `git bisect reset`. – Tim Biegeleisen Jan 08 '19 at 02:18
  • But I have run `git bisect reset` several times, it is still there, that's why I asked this question. – fluter Jan 08 '19 at 02:19
  • Try running these 4 commands: `git bisect start`, `git bisect bad`, `git bisect good HEAD`, `git bisect reset`. This is a no-op complete bisect, which hopefully will reset things. – Tim Biegeleisen Jan 08 '19 at 02:37
  • If your stage and WD are empty, try doing a `git reset --hard`. Anyway, the label is not really there, and should have no effect on your Git. – Tim Biegeleisen Jan 08 '19 at 02:54