Difficulty: Beginner
Estimated Time: 10 minutes

Software bugs have been a problem for as long as software has existed. As Git records all the commits to the repository then it becomes a great source of information and diagnostic tool when identifying how issues were introduced.

In this scenario we'll explore the different ways you can find which commit introduced the problem. The environment has been initialised with a Git repository containing a single HTML file which renders a list of items.

With the comprehensive history of your source code within the Git repository allows you to go back in time and identify when issues occurred, such as bugs or performance issues. Commands like git diff allow you to quickly compare changes, while git bisect helps you search to identify the cause.

This scenario has been added to your scrapbook where you can review the examples and commands you executed.

Scenario 7 - Finding Bugs

Step 1 of 4

Git Diff Two Commits

The git diff command is the simplest to compare what's changed between commits. It will output the differences between the two commits.

Example

You can visually any two commits by providing the two commits hash-ids or pointers (blobs)

git diff HEAD~2 HEAD

This tab will not be visible to users and provides only information to help authors when creating content.

Creating Katacoda Scenarios

Thanks for creating Katacoda scenarios. This tab is designed to help you as an author have quick access the information you need when creating scenarios.

Here are some useful links to get you started.

Running Katacoda Workshops

If you are planning to use Katacoda for workshops, please contact [email protected] to arrange capacity.

Debugging Scenarios

Below is the response from any background scripts run or files uploaded. This stream can aid debugging scenarios.

If you still need assistance, please contact [email protected]