Skip to content

Commit

Permalink
Tipify view-changes-summary
Browse files Browse the repository at this point in the history
  • Loading branch information
Chalarangelo committed Apr 25, 2024
1 parent 4bf5d91 commit ec5bfb0
Showing 1 changed file with 20 additions and 8 deletions.
28 changes: 20 additions & 8 deletions content/snippets/git/s/view-changes-summary.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,35 @@
---
title: View a summary of changes between two commits
type: snippet
title: View a summary of changes between two Git commits
shortTitle: View changes summary
type: tip
language: git
tags: [repository,branch]
cover: taking-photos
dateModified: 2021-04-13
excerpt: Learn how to view a summary of changes between two Git commits, using a single command.
dateModified: 2024-04-24
---

Prints a summary of changes between two given commits.
Have you ever wanted to see the **changes between two commits** in a Git repository without having to go through the entire commit history? A summary of changes can help you understand the differences between two commits quickly. So how can you do that?

- Use `git shortlog <commit>..<other-commit>` to view a summary of changes between the two given commits.
- Use arrow keys to navigate, press <kbd>Q</kbd> to exit.
Using `git shortlog <commit>..<other-commit>`, you can view a summary of changes between two given commits. Note that the two commits **don't have to be consecutive**, and you can use any valid commit references, such as **commit hashes**, **branch names**, or **tags**. This allows you to compare any two points in the repository's history.

As usual, you can navigate through the summary using the arrow keys and exit by pressing <kbd>Q</kbd>.

```shell
git shortlog <commit>..<other-commit>
# Syntax: git shortlog <commit>..<other-commit>

# Examples
git shortlog 3050fc0de..HEAD
# Duck Quacking (2):
# Fix network bug
# Update documentation

git shortlog v1.0..v2.0
# Duck Quacking (2):
# Add new feature
# Update dependencies

git shortlog master..feature-branch
# Duck Quacking (2):
# Add new feature
# Update documentation
```

0 comments on commit ec5bfb0

Please sign in to comment.