Skip to content

Commit

Permalink
Add .git-blame-ignore-revs to ignore linting/formatting commits
Browse files Browse the repository at this point in the history
This commit adds a .git-blame-ignore-revs file to ignore linting/
formatting commits while using git blame. It also documents its usage
in CONTRIBUTING.md for future references.

Resolves #861.

Signed-off-by: Hoang Thuan Pham <hoang.pham@calian.ca>
  • Loading branch information
hoangphamEclipse committed May 15, 2023
1 parent 6e3116b commit 8d5db13
Showing 2 changed files with 11 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .git-blame-ignore-revs
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Run code through Prettier
f194f10b3b3ed4b0cdd2bf28786a9c6f28248c94
9 changes: 9 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -125,6 +125,15 @@ more may be necessary depending on the case. Here is an example used to uplift f
1. Align `node-version` in `.github/workflows` yaml files with Theia's.
* Referring also to Theia's `"node"` and `@types/node` versions in its root `package.json` file.

## Ignoring linting/formatting commits

Should one be needing to use `git blame` to view the changes that were made recently to a file, it might be necessary to
ignore the changes that were made in linting/formatting commits. In the root of the repo, there is a `.git-blame-ignore-revs`
file. Adding the SHA-1 of a commit to this file will make `git-blame` ignore that commit. To use this file:

* For GitHub, this file is automatically detected and will ignore all the commits that are included in the file.
* With Git CLI, run `git blame --ignore-revs-file=.git-blame-ignore-revs <pathToSomeFile>` to ignore the commits.

## Contact

For issues related to the Trace Viewer, please open a GitHub tracker for the [Theia Trace Extension][trace-viewer].

0 comments on commit 8d5db13

Please sign in to comment.