> For the complete documentation index, see [llms.txt](https://gitdeveloperguide.solomonmarvel.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://gitdeveloperguide.solomonmarvel.com/git-fundamentals/git-basics-practice-scenarios/exploring-commit-history.md).

# Exploring Commit History

#### <mark style="color:blue;">Scenario</mark>

Let's imagine that you are a developer working on a team project. You've joined the project recently and want to familiarize yourself with the commit history to gain insights into the development process. Understanding the commit history can help you comprehend the project's evolution, identify relevant changes, and facilitate smoother collaboration with your teammates.

**Viewing/Exploring Commits**

To begin exploring the commit history, Git provides a command for doing just that. Open up a terminal or command prompt and navigate to the repository directory.

```bash
git log
```

Running this command displays a list of commits in reverse chronological order, with the most recent commit appearing at the top. Each commit includes information such as the commit hash, author, date, and commit message.

#### Customizing the Log Output

The `git log` command offers various options to customize the output according to your preferences. Let's explore some commonly used options:

1. `--oneline`: This option provides a condensed view of the commit history, showing only the first line of the commit message and the commit hash.

```bash
git log --oneline
```

2. `--graph`: This option adds a text-based graph representation, illustrating the branch and merge history within the commit log.

```bash
git log --graph
```

These are just a couple of examples of how you can customize the `git log` output. Git provides many more options to suit different needs, such as filtering commits by author, date, or specific file changes. You can explore these options in the [official Git documentation on `git log`](https://git-scm.com/docs/git-log).

{% hint style="success" %}
The `git log` command serves as a powerful tool to review the commit history and gain insights into the project's development process. By customizing the log output with options like `--oneline` and `--graph`, you can tailor the view to your specific requirements.&#x20;
{% endhint %}

Take advantage of Git's flexibility and explore additional options to enhance your understanding of the commit history.
