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

Exclude major black only commits from git blame #2780

Merged
merged 2 commits into from
Feb 6, 2023
Merged

Exclude major black only commits from git blame #2780

merged 2 commits into from
Feb 6, 2023

Conversation

jdmcbr
Copy link
Member

@jdmcbr jdmcbr commented Feb 5, 2023

As more projects I've used have adopted black for styling, one minor
annoyance has been the impact that black commits that impact many
lines of code have on the usability of git blame. A co-worker
introduced me to the changes proposed here, which make the blame more
usable. As of spring last year, github now looks at
.git-blame-ignore-devs by default
(https://docs.github.com/en/repositories/working-with-files/using-files/viewing-a-file#ignore-commits-in-the-blame-view),
so the blame view in github will use these commits. devs who want their
local git blame will need the step added to the CONTRIBUTING.md file.

As more projects I've used have adopted `black` for styling, one minor
annoyance has been the impact that `black` commits that impact many
lines of code have on the usability of `git blame`. A co-worker
introduced me to the changes proposed here, which make the blame more
usable. As of spring last year, github now looks at
.git-blame-ignore-devs by default
(https://docs.github.com/en/repositories/working-with-files/using-files/viewing-a-file#ignore-commits-in-the-blame-view),
so the blame view in github will use these commits. devs who want their
local `git blame` will need the step added to the CONTRIBUTING.md file.
Copy link
Member

@martinfleis martinfleis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's cool, I didn't know about this!

@m-richards
Copy link
Member

Thanks also for sharing, I knew this was a problem, didn't know there was a nice solution

Co-authored-by: Matt Richards <45483497+m-richards@users.noreply.github.com>
@jdmcbr jdmcbr merged commit 0c0d048 into main Feb 6, 2023
@jdmcbr jdmcbr deleted the cleaner-blame branch February 6, 2023 17:42
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.

3 participants