Questions tagged [git-bisect]

git-bisect is part of the git CM software. It is used to find which change broke something.

88 questions
488
votes
6 answers

How to use git bisect?

I have read some articles saying that git bisect is awesome. However, I'm not a native speaker and I can't understand why it's awesome. Could someone please demonstrate with some code sample: How to use it? Is it just like svn blame?
IAdapter
  • 55,820
  • 69
  • 166
  • 236
179
votes
2 answers

Undoing a git bisect mistake

I'm doing a non-automated git bisect via command line. All is going well until I accidentally hit return on the wrong line in my command history, and rather than running the test, I run 'git bisect good' (or bad). Oops - I don't yet know if this…
Graham Perks
  • 21,623
  • 8
  • 56
  • 79
84
votes
1 answer

How to Abort Git Bisect

I started my git bisect by specifying good and bad revisions but I don't think they registered. Additionally, as I am attempting to specify git bisect good and bad, I don't think git is doing anything. I would like to abort the entire bisect so that…
Stunner
  • 11,108
  • 12
  • 79
  • 138
66
votes
3 answers

Why does git-bisect have to be run from the top level directory of the working tree?

If one tries to run any of the git-bisect commands from anywhere other than the root directory of the repository, one is told: You need to run this command from the toplevel of the working tree. Why is that? I know of no other git command that has…
Parker Coates
  • 5,918
  • 2
  • 26
  • 29
45
votes
4 answers

Git bisect with merged commits

I have a history that looks like this: * 3830e61 Add data escaping. (Bad) * 0f5e148 Improve function for getting page template. * aaf8dc5 Merge branch 'navigation' |\ | * 3e667f8 Add icons. | * 43a07b1 Add menu styles. …
tollmanz
  • 2,913
  • 4
  • 24
  • 32
44
votes
10 answers

How do you get git bisect to ignore merged branches?

I'm aware that git bisect is branch-aware by design, so that if between good commit, G, and bad commit, B, you merged in a branch, it needs to take those changes into consideration as well, as the bug may be contained in the branch. In my case I…
tddtrying
  • 820
  • 6
  • 12
34
votes
4 answers

How to `git bisect` only on one branch's commits?

In a project I am currently working on, we keep each feature its own brach and merge it back to master when the feature is ready. The commits inside each feature branch might include a lot of "WIP" and breaking functionality of other features until…
Kostas
  • 8,482
  • 11
  • 43
  • 61
28
votes
2 answers

How does git bisect skip choose the next commit to try?

When using git bisect, one can run git bisect skip to mark the current commit as being an unbuildable / untestable one, to try and get Git to pick some other commit to test instead. How does Git decide which commit to try after a git bisect skip?…
me_and
  • 13,911
  • 6
  • 58
  • 93
23
votes
1 answer

How can I cut down a git bisect run using file paths?

I'm using git bisect to find a failure inducing commit. However, a lot of the commits in the range are definately irrelevant (because they are commits to the documentation or to unit tests). I'd like to make git bisect automatically skip commits…
Frerich Raabe
  • 81,733
  • 18
  • 105
  • 196
21
votes
3 answers

git bisect says Bisecting: a merge base must be tested

I did a git bisect and got the result Bisecting: a merge base must be tested [bbdaf1111eea5365c0c94d6045d6263aab718925] Fix display bug with main-stage How can I proceed?
Alex
  • 27,292
  • 13
  • 89
  • 143
20
votes
1 answer

bisect everything, from initial commit

Say I have a small project with a very fast test script, and I just want to bisect everything, from the initial commit to the curret commit. How can I do that? To clarify, I don't want to waste time identifying a commit that is good and a commit…
Zaz
  • 39,637
  • 10
  • 70
  • 92
12
votes
2 answers

Changes made by merge commits not found by `git bisect` or `git log -S --all`

I made a fix to a file, and committed it to my git repository. Some time later, I found that it had regressed. I wanted to know in which commit the fix had been taken out, so I tried git bisect and git log --all -S TERM, where "TERM" was a string…
Rich
  • 13,254
  • 1
  • 56
  • 102
11
votes
2 answers

git bisect doesn't work, no output

I tried to use git bisect lately, but it just didn't work. The tree remained in master and I saw no output from git bisect whatsoever. Here's what I've tried: git bisect start git bisect bad # no output, tried a couple of times git bisect good #…
snitko
  • 9,407
  • 10
  • 59
  • 89
11
votes
3 answers

How do I run git bisect only on commits that changed a certain file?

I have a bug that have been introduced a long time ago, and testing for it is painful. However, I strongly suspect that changes which introduced the bug happened in one particular source code file. Can I run git bisect on a sub-set of commits that…
Max Yankov
  • 10,076
  • 10
  • 54
  • 116
10
votes
1 answer

Doing a git bisect and one of the commits doesn't build

I'm trying to find a problem in the app I'm working on and I started to do a git bisect. There are 9 steps to the bisect so 256+ commits that could potentially cause this issue. However, one of the git bisect steps checked out a commit that wouldn't…
Fogmeister
  • 70,181
  • 37
  • 189
  • 274
1
2 3 4 5 6