Using Git bisect to find out when a bug was introduced!

—-Simplified explanation—-
Here’s how to use git bisect , step-by-step!
Step 1: Find a commit where things were working. …
Step 2: Find a commit where things are not working. …
Step 3 – N: Use git bisect to find the problem commit. …
Step 4: Get back to a working state.
Using Git bisect to figure out when brokenness was introduced

Step by step with code.

git log -4 # find previous working commit
git checkout #hash
git bisect ?

run through previous commits then

git bisect good or bad
git checkout #hash

See link to get more info and better understanding.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s