From the course: Coding Exercises: Git

Unlock the full course today

Join today to access over 24,800 courses taught by industry experts.

Using Git to hunt down bugs

Using Git to hunt down bugs - Git Tutorial

From the course: Coding Exercises: Git

Using Git to hunt down bugs

(playful music) - [Narrator] Bugs can be tough to find when you've got a large history, and it's not clear when you introduced that bug. So how can Git help you track down a specific bug with a long history? I'll give you a couple of seconds to think about how you'd approach something like this. (playful music) Now Git has a little known feature called git bisect, and it's really good for tracking these things down. So here I have a project that I did. I know that in the past, this text would fade out as I scrolled up, and that's not happening anymore. So at some point I made some change that modified that, so let's see if we can use this feature to figure that out. So I'm going to start a bisecting session by issuing a git bisect start command. Now I know that this current commit is a bad commit, so I'm going to mark this commit as bad. Now, once you do that, you need to find a commit where you know that the project…

Contents