mirror of
https://github.com/newren/git-filter-repo.git
synced 2024-07-06 02:12:17 +02:00
filter-repo (README): include user-and-email-based filtering examples
Signed-off-by: Elijah Newren <newren@gmail.com>
This commit is contained in:
parent
c3d7fe8feb
commit
a451261f81
27
README.md
27
README.md
@ -556,4 +556,31 @@ the [callbacks section](#callbacks).
|
||||
|
||||
### User and email based filtering
|
||||
|
||||
To modify username and emails of commits, you can create a [mailmap
|
||||
file](https://git-scm.com/docs/git-shortlog#_mapping_authors) in the
|
||||
format accepted by
|
||||
[git-shortlog(1)](https://git-scm.com/docs/git-shortlog). For example,
|
||||
if you have a file named my-mailmap you can run
|
||||
|
||||
```shell
|
||||
git filter-repo --mailmap my-mailmap
|
||||
```
|
||||
|
||||
and if the current contents of that file are as follows (if the
|
||||
specified mailmap file is version controlled, historical versions of
|
||||
the file are ignored):
|
||||
|
||||
```
|
||||
Name For User <email@addre.ss>
|
||||
<new@ema.il> <old1@ema.il>
|
||||
New Name And <new@ema.il> <old2@ema.il>
|
||||
New Name And <new@ema.il> Old Name And <old3@ema.il>
|
||||
```
|
||||
|
||||
then we can update username and/or emails based on the specified
|
||||
mapping.
|
||||
|
||||
See also the `--name-callback` and `--email-callback` from the
|
||||
[callbacks section](#callbacks).
|
||||
|
||||
### Callbacks
|
||||
|
Loading…
Reference in New Issue
Block a user