Add a gitattributes file to ensure line-ending consistency and appropriate diff generation#10518
Merged
Add a gitattributes file to ensure line-ending consistency and appropriate diff generation#10518
Conversation
zachmargolis
approved these changes
Apr 29, 2024
Contributor
zachmargolis
left a comment
There was a problem hiding this comment.
I haven't run into issues without this, but seems reasonable to try! LGTM
**Why**: - The purpose of a Git Attributes file is to control merge and diff strategies for different files based on a set of markers applied by Git. - The most common use case is to ensure some files are treated as binary files (no diff generation) or to control line-ending normalization across operating systems. **How**: - Adding rules is similar to how `.gitignore` files work - `.gitattributes` files can also be added per directory - Repository-wide rules should be chosen with care and the knowledge that this production environment for this code base is Linux-based. - See https://git-scm.com/book/en/v2/Customizing-Git-Git-Attributes for more information. changelog: Internal, Code Management, Standardize Git-based file handling
cc8f65b to
285e109
Compare
brandemix
pushed a commit
to brandemix/18F-identity-idp
that referenced
this pull request
Jun 17, 2024
…riate diff generation (18F#10518) * Add .gitattributes file for diff control **Why**: - The purpose of a Git Attributes file is to control merge and diff strategies for different files based on a set of markers applied by Git. - The most common use case is to ensure some files are treated as binary files (no diff generation) or to control line-ending normalization across operating systems. **How**: - Adding rules is similar to how `.gitignore` files work - `.gitattributes` files can also be added per directory - Repository-wide rules should be chosen with care and the knowledge that this production environment for this code base is Linux-based. - See https://git-scm.com/book/en/v2/Customizing-Git-Git-Attributes for more information. changelog: Internal, Code Management, Standardize Git-based file handling
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🎫 Ticket
Link to the relevant ticket: N/A
🛠 Summary of changes
Overview
The purpose of a Git Attributes file is to control merge and diff strategies for different files based on a set of markers applied by Git. These Git Attributes files are read per-directory, in a cascading fashion, similar to Git Ignore files.
The most common use case is to ensure some files are treated as binary files (no diff generation) or to control line-ending normalization.
What's changed