-
Notifications
You must be signed in to change notification settings - Fork 521
Setup Git blame to ignore reformatting commit #5192
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
Conversation
@Copilot
Copilot
AI
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR sets up a git blame ignore file to exclude reformatting commits from blame results.
- Introduces a .git-blame-ignore-revs file with configuration instructions.
- Specifies a commit hash corresponding to a prettier reformatting commit.
Works on GitHub:
https://github.com/PowerShell/vscode-powershell/blame/main/examples/.vscode/launch.json
Doesn't work in vscode native blame tho 🥲
image
I'll see if there's an issue for that.
I was wrong! It's just not set in git by default.
git config blame.ignoreRevsFile .git-blame-ignore-revs
Now it is fine.
image
Probably should add something to the dev docs.
And done.