To view the Git commit history, you can use the following commands: 1. View a summarized log: The most basic way to view the commit history is by using the `git log` command. It displays the commit history in reverse chronological order, with the most recent commit appearing first. By default, it provides information such as the commit hash, author, date, and commit message.

   git log

Press the spacebar to scroll through the log, and press 'q' to exit the log view. 2. View a summarized log with graph: To get a more visually informative representation of the commit history, you can use the `git log` command with the `--graph` option. This displays the commit history as a text-based graph, showing the branches, merges, and commits.

   git log --graph

The graph view provides a clearer picture of how branches and commits are related. 3. View a summarized log with one-line commit messages: If you prefer a condensed view of the commit history, you can use the `--oneline` option with `git log`. This displays each commit on a single line, showing only the commit hash and the first line of the commit message.

   git log --oneline

This format is useful when you want a quick overview of the commit history. 4. View a detailed log: If you want to see more detailed information about each commit, you can use the `--stat` option with `git log`. This displays the summary of changes made in each commit, showing the modified files and the number of insertions and deletions.

   git log --stat

This is helpful when you need a more comprehensive understanding of the changes made in each commit. 5. Limit the number of commits: By default, `git log` shows the entire commit history. However, you can limit the number of commits displayed by using the `-n` or `--max-count` option, followed by the desired number of commits.

   git log -n 5

This command will show only the last five commits. 6. Filter the commit history: You can filter the commit history based on various criteria, such as the author, specific files, or a date range. Some examples include: - Filter by author:

     git log --author="John Doe"

- Filter by specific file:

     git log -- <file-path>

- Filter by date range:

     git log --since="2023-01-01" --until="2023-06-30"

These filters allow you to narrow down the commit history based on your specific requirements. Conclusion: These commands provide different ways to view the Git commit history, allowing you to examine the changes made, the commit relationships, and the associated metadata. Choose the option that best suits your needs for understanding and analyzing the commit history.