I have the following in my ~/.gitconfig
(this is only here to help you understand what I'm looking at):
[alias]
lg = log --graph --all --pretty=format:'%Cred%h %Cgreen(%cr)%Creset - %s %C(yellow)%d %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative
When I do a git log
, it shows me the full commit tree with branch names and stuff. Yesterday I initiated a git bisect
and today I see there is a refs/bisect/bad
branch in the output of my log.
What exactly is the refs/bisect/bad
branch and how do I get rid of it?
When you're using git bisect
, it uses refs/bisect/bad
to track the last bad commit. (That ref is updated when you do git bisect bad
.)
I suspect that what's happened here is that you got to the end of the bisect, and it reported the first bad commit, but you never ended the bisection with git bisect reset
, which would clean up the refs that it created. You can still run that command, and it'll take you back to where you were before starting the bisections - however, I'd make sure that your work is committed and git status is clean before doing so, just to avoid any possible confusion.
If you use __git_ps1
in your bash prompt, it will helpfully note that you're still in a bisection by outputting (9dad0bb...)|BISECTING
. I discussed __git_ps1
a bit in another answer, which might be helpful.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With