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

ignore styling commits in git blame #405

Merged
merged 1 commit into from
Apr 11, 2023

Conversation

AmrSaber
Copy link
Contributor

@AmrSaber AmrSaber commented Apr 5, 2023

Feature or Bug-fix

  • Refactoring

Detail

My recent PR #394 has a lot of changes but all of these changes are to styles only and not the code itself, this way the blame history for all the changed files is lost (it will always blame me).

This PR adds the file.git-blame-ignore-revs which contains the id of the styling commit and the command that you need to run once to fix the blame history for you.

Also Github understands that file and will show the history correctly.

This PR is based on this article and is suggested by Raul.

This file works for the whole repository, and in the future one only needs to add ids of styling commits and the history will be preserved correctly.


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Copy link
Contributor

@dlpzx dlpzx left a comment

Choose a reason for hiding this comment

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

nice, good idea

@dlpzx dlpzx merged commit f26fc01 into modularization-main Apr 11, 2023
@AmrSaber AmrSaber deleted the frontend/ignore-styling-blame branch April 11, 2023 09:29
dlpzx pushed a commit to dlpzx/aws-dataall that referenced this pull request May 25, 2023
### Feature or Bug-fix
- Refactoring

### Detail
My recent PR data-dot-all#394 has a lot
of changes but all of these changes are to styles only and not the code
itself, this way the blame history for all the changed files is lost (it
will always blame me).

This PR adds the file`.git-blame-ignore-revs` which contains the id of
the styling commit and the command that you need to run once to fix the
blame history for you.

Also Github understands that file and will show the history correctly.

This PR is based on [this
article](https://www.stefanjudis.com/today-i-learned/how-to-exclude-commits-from-git-blame/)
and is suggested by Raul.

This file works for the whole repository, and in the future one only
needs to add ids of styling commits and the history will be preserved
correctly.

---
By submitting this pull request, I confirm that my contribution is made
under the terms of the Apache 2.0 license.
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