Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
31b043e
feat: use `/bin/sh` interpreter
tomeon Sep 7, 2023
cb735e0
fix: replace Bash-specific code
tomeon Sep 7, 2023
79b0b57
feat: integrate with git's core shell library
tomeon Sep 8, 2023
2ef2f30
feat: put tmpfile in `.git`
tomeon Sep 8, 2023
f452ac1
chore: fix shellcheck linting errors
tomeon Sep 8, 2023
7c10c33
fix: do not attempt to shift > ARGC arguments
tomeon Sep 8, 2023
ab3edd4
chore: simplify debugging code
tomeon Sep 8, 2023
af8bb17
feat: add dry-run mode
tomeon Sep 8, 2023
3a86bc1
chore: send diagnostics to stderr
tomeon Sep 8, 2023
6347f40
BREAKING CHANGE: use `$GIT_EDITOR` for date edits
tomeon Sep 8, 2023
0b8f0fb
feat: support `redate.<param>` git config settings
tomeon Sep 8, 2023
f6ef871
chore: remove redundant `git log`
tomeon Sep 8, 2023
addeaf1
feat: remove repeated `--all` option checks
tomeon Sep 8, 2023
9469ef0
chore: format code with shfmt
tomeon Sep 8, 2023
5feb939
fix: add message for last chunk to be collected
tomeon Sep 8, 2023
cbd8736
feat: permit specifying commit ranges
tomeon Sep 8, 2023
0104765
chore: remove extraneous whitespace
tomeon Sep 8, 2023
0cdd22e
feat: show examples of usage modes
tomeon Sep 8, 2023
486b531
doc: describe new options and configuration params
tomeon Sep 8, 2023
a9b06b7
fix: omit previously-filtered commits
tomeon Nov 3, 2023
7ca6aec
feat: support signing rewritten commits
tomeon Nov 3, 2023
7f121e1
fix: normalize Git configuration settings
tomeon Nov 3, 2023
96e51ea
fix: exit if no commits matched selection criteria
tomeon Nov 6, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 35 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,43 @@ For window's users, you may paste the file into `${INSTALLATION_PATH}\mingw64\li

Simply run: `git redate --commits [[number of commits to view]]`. You'll have to force push in order for your commit history to be rewritten.

To be able to edit all the commits at once add the --all option: `git redate --all`
To be able to edit all the commits at once add the --all option: `git redate --all`. This option can be negated with `--no-all`.

You can also specify a range of commits[^git-gitrevisions-help] as a positional parameter, instead of `--count` or `--all`: `git redate HEAD~10..HEAD~6`

**Make sure to run this on a clean working directory otherwise it won't work.**

The `--commits` (a.k.a. `-c`) argument is optional, and defaults to 5 if not provided.

<!-- note that this renders an info box -->
> **Note**
> See `git redate -h` for further usage information.

## Configuration

You may set default values for various `git redate` options in your Git client configuration.[^git-config-help]

The available options are:

- `redate.all`: takes a boolean value (`true`, `false`, `yes`, `no`, etc.[^git-config-help]). When enabled, `git redate` defaults to editing all commits.
- `redate.commits`: takes a positive integer. Used as the default number of commits to edit.
- `redate.debug`: takes a boolean value. When enabled, `git redate` defaults to issuing extra diagnostic information to standard error.
- `redate.limit`: takes a positive integer. Used as the default number of commits to modify in a single `git filter-branch` operation.
- `redate.original`: takes a namespace. Used as the namespace where the re-dated commits will be stored.[^git-filter-branch-help]
- `redate.gpgsign`: takes a boolean value. When enabled, `git redate` defaults to signing re-dated commits.

Example configuration:

```INI
[redate]
all = no
commits = 10
debug = true
limit = 35
original = refs/redate
gpgsign = yes
```

[^git-gitrevisions-help]: See [`git help gitrevisions`](https://git-scm.com/docs/gitrevisions) for various ways to spell commit ranges.
[^git-config-help]: See [`git help config`](https://git-scm.com/docs/git-config) for more info on configuring your Git client.
[^git-filter-branch-help]: See [`git help filter-branch`](https://git-scm.com/docs/git-filter-branch) for more info on `git filter-branch` options.
Loading