{"thread":{"id":"18710","subject":"git bisect issue","startedAt":"2009-04-04T09:11:39Z","lastAt":"2009-04-04T19:48:31Z","messageCount":2,"participants":["malc@pulsesoft.com","Christian Couder"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"110330","messageId":"Pine.LNX.4.64.0904041307360.10230@linmac.oyster.ru","threadId":"18710","inReplyTo":null,"subject":"git bisect issue","fromName":"","fromEmail":"malc@pulsesoft.com","sentAt":"2009-04-04T09:11:39Z","receivedAt":"2009-04-04T09:11:39Z","isPatch":false,"sender":{"key":"malc@pulsesoft.com","avatar":null},"body":"Hello,\n\nI was trying to run git bisect today and stumbled upon this:\n\n$ git bisect start\nerror: pathspec 'bisect' did not match any file(s) known to git.\n\n.git had some (stale?) BISECT_XXX files in it, and removing them\nhelped. One of those (BISECT_START) consisted of a single line:\n\"bisect\". If i remember correctly i used to have a bisect branch\nin this particular repo.\n\n-- \nmailto:av1474@comtv.ru\n"},{"id":"110342","messageId":"200904042148.32723.chriscool@tuxfamily.org","threadId":"18710","inReplyTo":"Pine.LNX.4.64.0904041307360.10230@linmac.oyster.ru","subject":"Re: git bisect issue","fromName":"Christian Couder","fromEmail":"chriscool@tuxfamily.org","sentAt":"2009-04-04T19:48:31Z","receivedAt":"2009-04-04T19:48:31Z","isPatch":false,"sender":{"key":"christian.couder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/208954?v=4"},"body":"Hi,\n\nLe samedi 4 avril 2009, malc@pulsesoft.com a écrit :\n> Hello,\n>\n> I was trying to run git bisect today and stumbled upon this:\n>\n> $ git bisect start\n> error: pathspec 'bisect' did not match any file(s) known to git.\n>\n> .git had some (stale?) BISECT_XXX files in it, and removing them\n> helped. One of those (BISECT_START) consisted of a single line:\n> \"bisect\". If i remember correctly i used to have a bisect branch\n> in this particular repo.\n\nWhen you start bisecting, the current branch is saved in .git/BISECT_START \nso if you started a bisection in a branch named \"bisect\", then \"bisect\" was \nsaved in \".git/BISECT_START\". Then you probably didn't use \"git bisect \nreset\" to stop bisecting, so the .git/BISECT_START file was not removed.\n\nYou probably deleted the \"bisect\" branch and later when you started a new \nbisection, \"git bisect\" found the .git/BISECT_START file, so it thought \nthat you were currently bisecting.\n\nIt then tryed to abort the previous bisection by going back to branch saved \nin the .git/BISECT_START file, and that failed with the error message you \nsaw.\n\nThe error message could perhaps be improved with this patch:\n\ndiff --git a/git-bisect.sh b/git-bisect.sh\nindex e313bde..093736c 100755\n--- a/git-bisect.sh\n+++ b/git-bisect.sh\n@@ -77,7 +77,7 @@ bisect_start() {\n        then\n                # Reset to the rev from where we started.\n                start_head=$(cat \"$GIT_DIR/BISECT_START\")\n-               git checkout \"$start_head\" || exit\n+               git checkout \"$start_head\" -- || exit\n        else\n                # Get rev from where we start.\n                case \"$head\" in\n\nit will give the following error message instead of the one you saw:\n\nfatal: invalid reference: bisect\n\nRegards,\nChristian.\n"}]}