Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add .git-blame-ignore-revs #351

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

whabanks
Copy link
Contributor

@whabanks whabanks commented Jan 31, 2025

Summary | Résumé

This PR adds .git-blame-ignore-revs to the project. This lets us to filter out specified commits when using git blame, e.g. bulk formatting and other changes that do not affect functionality.

To ignore a commit, just add the commit SHA to .git-blame-ignore-revs

Test instructions | Instructions pour tester la modification

  1. Open .git-blame-ignore-revs and open one of the links to an ignored commit.
  2. Open a file that the ignored commit changed and run git blame.
  3. Note that the ignored commits are not present and the commit previous is shown instead.

After this PR is merged

  • Repeat the above steps but open the file on the Github website and open the blame tool
  • The excluded commits are not present on the web version
  • Appending a ~ to the commit SHA in the URL shows the ignored commits

    - Added .git-blame-ignore-revs to the project
    - Exclude large formatting commits from git blame
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants