git-commits-since
List git commits since a tag
TLDR
Display commits since yesterday
Display commits since last week
Display commits since last month
Display commits since yesterday 2pm
SYNOPSIS
git-commits-since [options] <date-string> [<path>...]
PARAMETERS
<date-string>
The required argument specifying the starting date or time for listing commits. Git understands various date formats, including absolute dates (e.g., '2023-01-15', '2023-01-15T10:30:00'), relative dates (e.g., 'yesterday', '2 weeks ago', '2 hours and 30 minutes ago'), and specific named dates.
<path>...
Optional paths to limit the commits displayed to those that affected the specified files or directories. This allows focusing on changes within a particular part of the codebase.
--author=<pattern>
Limits the commits to those whose author matches the specified pattern (a regular expression). Case-insensitive by default.
--grep=<pattern>
Limits the commits to those whose log message matches the specified pattern (a regular expression). Useful for finding commits related to specific features or bug fixes.
--format=<format>
Allows customization of the output format for each commit, similar to git log --pretty=format
. Common formats include 'oneline', 'short', 'medium', 'full', 'fuller', or custom formats using placeholders.
--max-count=<num>
Limits the number of commits to output. Displays only the first <num> commits found since the specified date.
--oneline
A shorthand for --format=oneline
. Each commit is displayed on a single line, showing the commit hash and the first line of the commit message.
--no-merges
Excludes merge commits from the output, showing only 'true' development commits.
--stat
Shows a diffstat (a summary of changes, i.e., files changed, insertions, deletions) for each commit.
--all
Considers all references (e.g., all local branches, remote-tracking branches, and tags) when looking for commits. By default, it operates only on the current branch.
DESCRIPTION
The git-commits-since command is designed to provide a focused view of a Git repository's history, specifically listing all commits that have occurred after a specified date or time. It acts as a convenient wrapper or specialized script around Git's powerful git log
command, simplifying the process of querying recent changes.
This utility is particularly useful for quickly reviewing daily progress, identifying changes made since a last deployment, or tracking development activity over a specific period. By accepting a wide range of date formats, from absolute timestamps like '2023-10-26' to relative expressions such as '2 weeks ago' or 'yesterday', it offers flexibility in historical navigation.
While not a standard Git command, git-commits-since addresses a common need for streamlined chronological commit retrieval, often implemented by users or community projects to enhance their Git workflow. It typically provides a clean, chronological list of commit IDs, authors, dates, and commit messages, with options to customize the output or filter results further.
CAVEATS
git-commits-since is not a standard command shipped with Git itself. It typically refers to a custom script or an external tool that wraps git log --since
. Therefore, its availability, exact behavior, and supported options may vary significantly depending on the system or environment. Users should confirm if such a script exists and its specific implementation before relying on it.
The accuracy of date parsing can sometimes be affected by locale settings or the specific version of Git/script being used. Performance may be impacted on very large repositories or when specifying a very old date, as Git needs to traverse a potentially extensive history.
DATE FORMATS
Git's date parsing is quite flexible. The <date-string> can be:
An absolute date: 'YYYY-MM-DD', 'YYYY-MM-DDTHH:MM:SS', 'MM/DD/YYYY HH:MM:SS'.
Relative dates: 'yesterday', 'last monday', '2 weeks ago', '3 days 4 hours ago', '1.second.ago'.
Named dates: 'now'.
Epoch timestamps: '@1672531200' (for Jan 1, 2023, 00:00:00 UTC).
The specific parsing capabilities depend on the underlying Git version and the environment's C library (e.g., strtotime
-like functions if used in a script).
DEFAULT BEHAVIOR
When git-commits-since is invoked with only a <date-string>, it typically lists commits starting from that date on the current branch. The output format is usually a concise summary (similar to git log
's default or --oneline
), showing the commit hash, author, date, and subject line. To see commits across all branches or in a different format, specific options like --all
or --format
must be used.
HISTORY
The concept behind git-commits-since emerged from the frequent need to filter Git history by date, a common use case for developers and project managers. While Git's native git log --since
option provides this functionality, users often create custom scripts or aliases to simplify its invocation, add specific default behaviors, or integrate it into larger workflows.
This command represents a pattern for such a convenience wrapper, making the powerful date-filtering capabilities of git log
more accessible and memorable without requiring the full syntax of git log
and its date-specific options.
SEE ALSO
git-log(1), git-rev-list(1), git-show(1), git-diff(1)