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 7, 2023
1 parent 40182dd commit 4c8f5df
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;
9f4098ffcbe9e5d39d3f599ce7f935b0f9e69cf7
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 4c8f5df

Please sign in to comment.