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 - 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
-
-
-
Cloning with limited history1m 33s
-
(Locked)
Adding to a previous commit4m 36s
-
(Locked)
Identifying your changes2m 26s
-
(Locked)
Managing multiple remotes2m 42s
-
(Locked)
Cleaner logs3m 25s
-
(Locked)
Using Git to hunt down bugs5m 7s
-
(Locked)
Working on multiple branches3m 19s
-
(Locked)
Creating a .zip file2m 57s
-
(Locked)
Getting rid of quick fixes4m 48s
-
(Locked)
Marking items without branching4m 8s
-
(Locked)
Removing untracked files2m 44s
-
(Locked)
Renaming branches2m 31s
-
(Locked)
Remove local, keep master3m 15s
-
(Locked)
Picking specific commits4m 30s
-
(Locked)
Creating a safety net for fixes2m 51s
-