forcedotcom / forcedotcom/dx-empty
Add default .gitattributes
- Dominant language
- JavaScript
- Stars
- 59
- Forks
- 87
- PR merge metrics
- No merged PRs in 30d
Description
**Why add a default .gitattributes file?**
I've customer that use the dx-empty repository - as if it's some for of best practice for salesforce (which you never claim). Adminveloper and more already have many difficulties to understand what's going on. Having a default git attribute would help them with the hussles they are facing.
Adding a .gitattributes file with sensible defaults ensures consistent behavior across different operating systems and developer environments. Without it, Git relies on each contributor’s local configuration (e.g., core.autocrlf), which can lead to line ending inconsistencies, merge conflicts, and unnecessary diffs.
**Benefits of this configuration**
Cross-platform consistency
- Setting `* text eol=auto` ensures text files use the correct line endings for the contributor’s platform while maintaining a consistent representation in the repository. This prevents Windows vs. Unix line ending issues from showing up as spurious changes.
Binary file integrity
- Marking `*.asset binary` ensures that binary files are never modified by Git’s line ending normalization. This protects against corruption and unnecessary diffs.
**Proposed Default**
```
# Set the default line return behavior, in case people don't have core.autocrlf set.
* text eol=auto
# Prevent Git from altering binary asset files
*.asset binary
```
_assisted by ai, checked for correctness_
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.