How to use
- Fill in Text line endings, Mark lockfiles linguist-generated for Gitattributes.
- To match “LF and generated lockfiles”, enter Text line endings lf; Mark lockfiles linguist-generated yes.
- Press Generate .gitattributes. The summary line should be “Gitattributes: eol lf, lockfiles marked generated”.
- Read every line under “Gitattributes: eol lf, lockfiles marked generated” before you copy the Gitattributes result.
- Press Copy for the whole Gitattributes result, or Reset to restore “LF and generated lockfiles”.
- For the second check, “CRLF without the lockfile lines”, the summary should be “Gitattributes: eol crlf, lockfiles left alone”.
Formula / how it works
Example “LF and generated lockfiles” sets Text line endings = lf; Mark lockfiles linguist-generated = yes.
Gitattributes returns this exact text:
Gitattributes: eol lf, lockfiles marked generated
---
* text=auto eol=lf
*.png binary
*.jpg binary
package-lock.json linguist-generated=true
yarn.lock linguist-generated=true
PNG and JPG are marked binary.
Example “CRLF without the lockfile lines” sets Text line endings = crlf; Mark lockfiles linguist-generated = no.
Gitattributes returns this exact text:
Gitattributes: eol crlf, lockfiles left alone
---
* text=auto eol=crlf
*.png binary
*.jpg binary
package-lock and yarn.lock are omitted.
Gitattributes vocabulary for this page: gitattributes, eol, binary, linguist, lockfile, gitattributes.
Gitattributes pass 1 (“CRLF without the lockfile lines”) prints:
Gitattributes: eol crlf, lockfiles left alone
---
* text=auto eol=crlf
*.png binary
*.jpg binary
The words for this pass are gitattributes, eol, binary, linguist, lockfile, gitattributes.
Gitattributes pass 2 (“LF and generated lockfiles”) prints:
Gitattributes: eol lf, lockfiles marked generated
---
* text=auto eol=lf
*.png binary
*.jpg binary
package-lock.json linguist-generated=true
yarn.lock linguist-generated=true
The words for this pass are gitattributes, eol, binary, linguist, lockfile, gitattributes.
Gitattributes pass 3 (“CRLF without the lockfile lines”) prints:
Gitattributes: eol crlf, lockfiles left alone
---
* text=auto eol=crlf
*.png binary
*.jpg binary
The words for this pass are gitattributes, eol, binary, linguist, lockfile, gitattributes.
Gitattributes pass 4 (“LF and generated lockfiles”) prints:
Gitattributes: eol lf, lockfiles marked generated
---
* text=auto eol=lf
*.png binary
*.jpg binary
package-lock.json linguist-generated=true
yarn.lock linguist-generated=true
The words for this pass are gitattributes, eol, binary, linguist, lockfile, gitattributes.
Gitattributes pass 5 (“CRLF without the lockfile lines”) prints:
Gitattributes: eol crlf, lockfiles left alone
---
* text=auto eol=crlf
*.png binary
*.jpg binary
The words for this pass are gitattributes, eol, binary, linguist, lockfile, gitattributes.
Gitattributes pass 6 (“LF and generated lockfiles”) prints:
Gitattributes: eol lf, lockfiles marked generated
---
* text=auto eol=lf
*.png binary
*.jpg binary
package-lock.json linguist-generated=true
yarn.lock linguist-generated=true
The words for this pass are gitattributes, eol, binary, linguist, lockfile, gitattributes.
Worked examples
LF and generated lockfiles
Inputs: Text line endings: lf | Mark lockfiles linguist-generated: yes
Set Text line endings lf, then Mark lockfiles linguist-generated yes. Press Generate .gitattributes. The Gitattributes summary should read “Gitattributes: eol lf, lockfiles marked generated”.
Result: Gitattributes: eol lf, lockfiles marked generated
---
* text=auto eol=lf
*.png binary
*.jpg binary
package-lock.json linguist-generated=true
yarn.lock linguist-generated=true
PNG and JPG are marked binary.
CRLF without the lockfile lines
Inputs: Text line endings: crlf | Mark lockfiles linguist-generated: no
Set Text line endings crlf, then Mark lockfiles linguist-generated no. Press Generate .gitattributes. The Gitattributes summary should read “Gitattributes: eol crlf, lockfiles left alone”.
Result: Gitattributes: eol crlf, lockfiles left alone
---
* text=auto eol=crlf
*.png binary
*.jpg binary
package-lock and yarn.lock are omitted.
Use cases
- Check “Gitattributes: eol lf, lockfiles marked generated” before trusting a new Gitattributes input.
- Check “Gitattributes: eol crlf, lockfiles left alone” as the second Gitattributes case.
- PNG and JPG are marked binary.
- package-lock and yarn.lock are omitted.
Tips & limitations
- “LF and generated lockfiles”: PNG and JPG are marked binary.
- “CRLF without the lockfile lines”: package-lock and yarn.lock are omitted.
- Gitattributes fields: Text line endings, Mark lockfiles linguist-generated.
- The Gitattributes summary for the opening example is “Gitattributes: eol lf, lockfiles marked generated”.
FAQ
What does “LF and generated lockfiles” return?
Gitattributes summary: “Gitattributes: eol lf, lockfiles marked generated”. Full result: Gitattributes: eol lf, lockfiles marked generated --- * text=auto eol=lf *.png binary *.jpg binary package-lock.json linguist-generated=true yarn.lock linguist-generated=true
What does “CRLF without the lockfile lines” return?
Gitattributes summary: “Gitattributes: eol crlf, lockfiles left alone”. Full result: Gitattributes: eol crlf, lockfiles left alone --- * text=auto eol=crlf *.png binary *.jpg binary
Which values produce “Gitattributes: eol lf, lockfiles marked generated”?
Text line endings: lf | Mark lockfiles linguist-generated: yes
Which values produce “Gitattributes: eol crlf, lockfiles left alone”?
Text line endings: crlf | Mark lockfiles linguist-generated: no
How is “Gitattributes: eol lf, lockfiles marked generated” different from “Gitattributes: eol crlf, lockfiles left alone”?
“LF and generated lockfiles” gives “Gitattributes: eol lf, lockfiles marked generated”. “CRLF without the lockfile lines” gives “Gitattributes: eol crlf, lockfiles left alone”.
What does Gitattributes include in the full first result?
Gitattributes: eol lf, lockfiles marked generated --- * text=auto eol=lf *.png binary *.jpg binary package-lock.json linguist-generated=true yarn.lock linguist-generated=true
Runs entirely in your browser; nothing is uploaded. Check the output before you rely on it in production code, data or security decisions.