https://github.com/clarson/git_dedupe_commits
Removes duplicate commits on a branch.
https://github.com/clarson/git_dedupe_commits
bash git
Last synced: about 2 months ago
JSON representation
Removes duplicate commits on a branch.
- Host: GitHub
- URL: https://github.com/clarson/git_dedupe_commits
- Owner: clarson
- License: gpl-3.0
- Created: 2025-08-31T21:45:11.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2025-09-03T00:37:29.000Z (10 months ago)
- Last Synced: 2025-09-16T02:22:09.382Z (10 months ago)
- Topics: bash, git
- Language: Shell
- Homepage:
- Size: 17.6 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
### NAME
git_dedupe_commits.sh
### SYNOPSIS
git_dedupe_commits.sh [ -l | --loosen ]
[ --ca | --common-ansestor ] [ -d | --delim ]
[ --dr | --dry-run ] [ -v | --verbose ]
[ -p | --progress ] [ --pt | --preserve-tmp ]
### DESCRIPTION
Removes duplicate commits on a branch.
### Options
-l, --loosen
Loosen the commit matching. Can specify multiple times to make
it more forgiving on matches. Useful when commit messages don't
match due to edits during rebasing.
--ca, --common-ansestor (Default)
Use merge-base to determine common ansestor. Speeds up finding
duplicate commits, but slightly possible to miss commits.
---no-ca, --no-common-ansestor
Disables common-ansestor. Slower, but possibly more accurate.
-d, --delim (Default: |)
Change delimiter. Must be a printable character.
--dr, --dry-run
Dry run. Emits the cherry-pick command to be run, and does NOT
run the command.
--no-dr, --no-dry-run (Default)
Does the run.
-v, --verbose
Verbose output.
--no-verbose (Default)
Disable verbose output.
-p, --progress (Default)
Progress output.
--no-progress
Disables progress output.
--pt, --preserve-tmp
Preserves the temporary directory. Could be useful for debuging.
--no-pt, --no-preserve-tmp (Default)
Deletes temporary directory.
### Usage
1) Create a clean branch based on the base/team branch
2) Run git_dedupe_commits.sh