How could I use git bisect to find the first GOOD commit?

后端 未结 5 1345
清酒与你
清酒与你 2020-12-22 23:05

I have the following problem:

  • the version at master works fine
  • the version of the last tag before master (say last
5条回答
  •  情话喂你
    2020-12-22 23:47

    Git aliases are a good idea, however the terms fixed and unfixed have the same issue than good and bad: you cannot have them be compatible with both regressions and progressions. It's easy to find words which work either way: simply pick them up from the original binary search terminology which is neutral in nature with no preconception of what is good or bad. For instance:

    git config --global alias.bisect-high 'bisect bad'
    git config --global alias.bisect-low  'bisect good'
    

    With neutral terms like these you can always type: git bisect-high (or git bisect-upper, or git-bisect max,... your choice!) whether you're looking for a regression or a fix.

    Too bad the git bisect developers could not simply re-use any of the existing terms. The user interface is not git's concern generally speaking: http://stevebennett.me/2012/02/24/10-things-i-hate-about-git/

提交回复
热议问题