https://github.com/ext/git-foreach-ref
Run command for each commit in a given range
https://github.com/ext/git-foreach-ref
git
Last synced: about 1 month ago
JSON representation
Run command for each commit in a given range
- Host: GitHub
- URL: https://github.com/ext/git-foreach-ref
- Owner: ext
- License: mit
- Created: 2017-09-08T23:24:26.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2017-09-08T23:32:04.000Z (almost 9 years ago)
- Last Synced: 2025-04-06T10:44:47.879Z (about 1 year ago)
- Topics: git
- Language: Shell
- Size: 1000 Bytes
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# git-foreach-ref
Run command for each commit in a given range.
Useful to test a script or building before pushing to ensure each commit
compiles, tests successful, passes linting, etc.
## Usage
git foreach-ref REF COMMAND [OPTIONS..]
when `REF` is the commit range. If not using `..` `..HEAD` is implied. It uses
`rev-list` to find commits, see `git-rev-list(1)` for details on entering ranges.
The common use-case is to just use the parent branch, e.g. `master`.
## Example
git foreach-ref master make check
Will run `make check` for each commit starting at master up to current HEAD.