LinuxCommandLibrary

git-commits-since

List git commits since a tag

TLDR

Display commits since yesterday

$ git commits-since [yesterday]
copy

Display commits since last week
$ git commits-since [last week]
copy

Display commits since last month
$ git commits-since [last month]
copy

Display commits since yesterday 2pm
$ git commits-since [yesterday 2pm]
copy

SYNOPSIS

git commits-since [<since>]

PARAMETERS

<since>
    Date, tag, branch, or ref (e.g., '2023-01-01', '2 weeks ago', 'main'); defaults to 90 days ago

-h, --help
    Display usage help

-v, --version
    Show version information

DESCRIPTION

The git-commits-since command, part of the git-extras utility collection, generates a summary of Git commits made since a specified date, tag, branch, or reference. It provides a concise shortlog-style output showing the number of commits per author, making it ideal for quick overviews of recent activity.

Without arguments, it defaults to commits from the last 90 days. For example, running git commits-since displays output like:
42 John Doe
15 Jane Smith
, helping teams track contributions effortlessly.

This wrapper leverages git shortlog -sn --since=<date> under the hood, parsing natural language dates (e.g., '2 weeks ago', '2023-01-01', or 'v1.0'). It's particularly useful in CI/CD pipelines, release notes generation, or daily standups to quantify changes since milestones.

Unlike git log, it focuses on aggregated counts rather than full details, promoting brevity. Note that it requires a clean Git repository context and respects remotes if specified.

CAVEATS

Not a core Git command; requires git-extras installation. Output depends on current branch/HEAD. Ignores merge commits in counts.

INSTALLATION

Via package managers: apt install git-extras (Debian), brew install git-extras (macOS); or git clone https://github.com/git-extras/git-extras.git && cd git-extras && sudo make install

EXAMPLE OUTPUT

git commits-since '1 month ago'
produces:
120 Alice
45 Bob
10 Charlie

HISTORY

Introduced in git-extras (v1.0+, 2011) by Mark Oteiza; maintained by Linus Heck. Evolved from community need for commit summaries; now in v6.0+ with improved date parsing.

SEE ALSO

git shortlog(1), git log(1), git rev-list(1)

Copied to clipboard