Hands-on task
Find the first bad commit
In /root/repo there is a linear history of eight commits (c0…c7). In each commit the file app.txt is overwritten. At some commit a bug marker appeared in app.txt and stayed in all subsequent commits — that is, all the early commits are "good", and starting from some point they're "bad".
Find the first bad commit (the one where bug appeared for the first time) and write its full hash into the file /root/answer.txt (as a single line). The very first commit c0 is known to be good, and the tip of the branch is known to be bad.
- git bisect
- regression hunting
- binary search
- git rev-parse
- commit hashes