Repository navigation
How can i Bisect between a parent and a child branch #5530
Replies: 4 comments
|
Have you taken a look at the demo from the |
|
You can do it from the commits panel. Checkout Lazygit then checks out a commit in the middle. Test it, press If you can't find where dev branched off, |
|
Hi, you can use Git bisect for this. The important part is that bisect works with commits, even when those commits are on different branches. Since the bug exists in dev but not in staging, you need two reference points: a known bad commit from dev and a known good commit from before the bug appeared. In Lazygit, open the Commits panel and press b on a commit to start the bisect workflow. Mark the commit containing the bug as bad, and a previously tested working commit as good. Lazygit will then help you narrow down the history by checking intermediate commits. Test the application at each step and mark the commit as good or bad depending on whether the bug is present. You can also do the same thing directly in Git: git bisect start dev staging That command assumes staging is an ancestor of dev and has been verified to be good. If the branches have diverged, you need to identify an appropriate known-good ancestor instead. After finding the problematic commit, run git bisect reset to return to your original checkout. One thing worth checking first: is staging actually behind dev in the same commit history, or have the branches diverged? That determines which commit you should use as the good starting point. |
|
#6168 adds the |
Uh oh!
There was an error while loading. Please reload this page.
so, i have a bug in my dev branch but i don't have that in staging, i wanna use git bisect inorder to find out which change introduced the bug, can't figure out how to do it in lazygit
All reactions