Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

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

Merged
merged 1 commit into from
May 16, 2025
Merged

Setup Git blame to ignore reformatting commit #5192

merged 1 commit into from
May 16, 2025

Conversation

andyleejordan
Copy link
Member

And done.

@Copilot Copilot AI review requested due to automatic review settings May 16, 2025 17:02
@andyleejordan andyleejordan added the Ignore Exclude from the changelog. label May 16, 2025
@andyleejordan andyleejordan requested a review from a team as a code owner May 16, 2025 17:02
Copy link

@Copilot Copilot AI left a 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.

@andyleejordan andyleejordan merged commit 6b0f82f into main May 16, 2025
8 checks passed
@andyleejordan andyleejordan deleted the blame branch May 16, 2025 17:08
@JustinGrote
Copy link
Collaborator

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.

@JustinGrote
Copy link
Collaborator

JustinGrote commented May 16, 2025

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Ignore Exclude from the changelog.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants