1

I'd like to use git bisect to debug a Django web-app I'm working on. However, reverting to old commits would break the entire site because the database schema changes so often. I'd like to be able to run git bisect so that it only checks out one folder. In this case, that folder would be static/, since the issue I'm trying to debug is on the front-end.

I've tried git bisect start -- static/ but this command only checks out commits that touch the specified folder (which is subtly different than what I want).

In short, I'd like to be able to run something like git bisect start --only-checkout=static/ which would only checkout the specific folder that I'm debugging.

Thanks!

camden
  • 1,908
  • 19
  • 18

1 Answers1

0

At each step, can you checkout some commit to get everything back to your tip branch commit and then just checkout the static dir using something from GIT: Checkout to a specific folder

Community
  • 1
  • 1
David Neiss
  • 8,161
  • 2
  • 20
  • 21
  • I can, but at that point I might as well be doing everything manually (which I did end up doing for this particular situation anyway). I'd be shocked if there wasn't a way to do this as it seems like such a natural workflow. – camden Jun 21 '16 at 01:02
  • 1
    There is also a --no-checkout flag, that keeps your working tree as it was. You can then run just the checkout for your static dir to bring those changes in. If you have some automated way of determining if it passed/failed, you can wrap that up into a script and pass that to git run, to automate it. – David Neiss Jun 21 '16 at 01:18