Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/alexkaratarakis/gitattributes
A collection of useful .gitattributes templates
https://github.com/alexkaratarakis/gitattributes
git gitattributes gitattributes-templates
Last synced: 3 months ago
JSON representation
A collection of useful .gitattributes templates
- Host: GitHub
- URL: https://github.com/alexkaratarakis/gitattributes
- Owner: gitattributes
- License: mit
- Created: 2012-05-16T12:39:06.000Z (over 12 years ago)
- Default Branch: master
- Last Pushed: 2024-05-22T07:58:06.000Z (6 months ago)
- Last Synced: 2024-05-22T18:14:47.770Z (6 months ago)
- Topics: git, gitattributes, gitattributes-templates
- Language: Git Attributes
- Size: 214 KB
- Stars: 3,227
- Watchers: 59
- Forks: 579
- Open Issues: 13
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-list - gitattributes
README
# A Collection of Useful .gitattributes Templates
Similarly to the [`.gitignore` Templates][gt], we're trying to build
templates for `.gitattributes`.`Common.gitattributes` contains general exclusions that may apply to any project.
Consider including them if they are applicable to your project.You can use [this](https://richienb.github.io/gitattributes-generator) or [this](https://gitattributes.com/) handy dandy generator to generate your gitattributes files on the fly based on files inside of this repository.
## CI step
To check if all files have a corresponding rule in .gitattributes, this script can be used:
```sh
missing_attributes=$(git ls-files | git check-attr -a --stdin | grep 'text: auto' || printf '\n')if [ -n "$missing_attributes" ]; then
printf '%s\n%s\n' '.gitattributes rule missing for the following files:' "$missing_attributes"
else
printf '%s\n' 'All files have a corresponding rule in .gitattributes'
fi
```You can also use the checked-in `./check.sh` which has more features.
Run `./check.sh --help` for the available options.## Contributing
Please contribute by [forking][fk] and sending a [pull request][pr].
Also **please** only modify **one file** per commit. This'll
make merging easier for everyone.For more information on gitattributes: [gitattributes(5)][g5] and for Github-specific grammar: [Linguist docs][gh]
[gt]: https://github.com/github/gitignore
[fk]: http://help.github.com/forking/
[pr]: http://help.github.com/pull-requests/
[g5]: https://www.git-scm.com/docs/gitattributes
[gh]: https://github.com/github-linguist/linguist/blob/master/docs/overrides.md