Skip to content

Commit

Permalink
Introduced .git-blame-ignore-revs file and docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Vooord committed Mar 9, 2023
1 parent e48d82a commit 4f7d4b0
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .git-blame-ignore-revs
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# see https://git-scm.com/docs/git-blame#Documentation/git-blame.txt---ignore-revs-fileltfilegt

# Prettier change:
# "trailingComma": "es5" -> "all";
# "printWidth": 80 -> 100;
f6326cffe7c08ee5755c3c4f46a27458165b1553
14 changes: 14 additions & 0 deletions README.dev.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,17 @@ Here is how you do this:
* [new tag] v0.0.9 -> v0.0.9

```

## Format the code

### ignore-revs-file

Sometimes (after long and bloody discussions) we decide to change `.prettierrc.json`. It leads to a huge commit,
as `Prettier` automatically reformats all the project files in a pre-commit hook. This commit has no use for git-blame,
so we'd like to ignore it, i.e. see the blame of previous commit for strings affected by reformatting.
Here comes [.git-blame-ignore-revs](./.git-blame-ignore-revs) file where we list such commits.
To make it work in your local repo, run

```shell
git config blame.ignoreRevsFile .git-blame-ignore-revs
```

0 comments on commit 4f7d4b0

Please sign in to comment.