https://github.com/sambacha/gitattributes
git-attributes configurations and generator
https://github.com/sambacha/gitattributes
git gitattributes gitattributes-generator gitattributes-templates
Last synced: 11 months ago
JSON representation
git-attributes configurations and generator
- Host: GitHub
- URL: https://github.com/sambacha/gitattributes
- Owner: sambacha
- License: other
- Created: 2020-09-22T19:55:21.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2021-09-16T20:39:07.000Z (over 4 years ago)
- Last Synced: 2025-03-26T23:44:29.461Z (11 months ago)
- Topics: git, gitattributes, gitattributes-generator, gitattributes-templates
- Language: JavaScript
- Homepage:
- Size: 62.5 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# gitattributes
## Overview
`.gitattributes` to configure your git repo
## Usage
```diff
# gitattributes
+ *.build text
+ *.cs text diff=csharp
+ *.csproj text
+ *.dll binary
+ *.dtd text
+ *.html text diff=html
+ *.java text diff=java
+ *.md text
+ *.nuspec text
+ *.rng text
+ *.rngc text
+ *.sh eol=lf
+ *.bash eol=lf
+ *.zsh eol=lf
+ *.shfbproj text
+ *.sln text
+ *.snk binary
+ *.xml text
+ *.xsd text
+ *.xsl text
+ *.yml text
.gitattributes text
KEY text
LICENSE+ * text
# text files
+ *.docx diff=word
# date
date+ *.txt filter=dater
# merges
# // git config --global merge.ours.driver true
database.xml merge=ours
# merge driver custom
+ package-lock.json merge=npm-merge-driver
+ npm-shrinkwrap.json merge=npm-merge-driver
# image formats
+ *.png diff=exif
+ *.jpg diff=exif
+ *.svg diff=exif
# gpg related
+ *.gpg filter=gpg diff=gpg
+ *.asc filter=gpg diff=gpg
# git archive
test/ export-ignore
# git encryption
+ secrets.txt filter=git-crypt diff=git-crypt
# create new definitions for each file. You can also add patterns in the following way:
+ *.key filter=git-crypt diff=git-crypt
+ secretdir/+ * filter=git-crypt diff=git-crypt
```
## Examples
```bash
$ npx npm-merge-driver install
npx: installed 52 in 1.953s
npm-merge-driver: npm-merge-driver installed to `git config --local` and .git/info/attributes
workstation~ /Users/sbacha/sambacha-solidity-coverage master
$ cat .git/info/attributes
npm-shrinkwrap.json merge=npm-merge-driver
package-lock.json merge=npm-merge-driver
```
## LICENSE
SPDX-License-Identifier: ISC/Apache-2.0