You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
人难免会写bug,有时候事后好久才发现原来自己前面写了个bug。这个时候,我们想知道到底是前面哪个commit引入了bug。一个快速的方法是:
git bisect
会利用二分搜索的方式替你选出下一个要测试的commitgit bisect
根据我们的回答选择其中一半的区间,缩小了范围,继续重复上面的步骤在范围比较小的时候,这个方法可能效果不大;但是当待测试的commit区间范围很大的时候,比起倒着一个个测过去,这种二分查找的方式确实能提高效率。
Beta Was this translation helpful? Give feedback.
All reactions