Skip to content

Instantly share code, notes, and snippets.

@KirkMunro
Last active February 15, 2023 10:24
Show Gist options
  • Star 9 You must be signed in to star a gist
  • Fork 5 You must be signed in to fork a gist
  • Save KirkMunro/d873a755b38a7bfa2495 to your computer and use it in GitHub Desktop.
Save KirkMunro/d873a755b38a7bfa2495 to your computer and use it in GitHub Desktop.
.gitattributes file contents for PowerShell script or manifest modules (signed or unsigned) and binary modules
# Treat all files in this project as binary. This enables atomic
# checkins (no merges, these are signed files) and it preserves
# CRLF line endings
* binary
# Set default behaviour, in case users don't have core.autocrlf set.
* text=auto
# Explicitly declare text files we want to always be normalized and converted
# to native line endings on checkout.
*.md text
*.gitattributes text
# Declare files that will always have CRLF line endings on checkout.
*.ps1 text eol=crlf
*.psm1 text eol=crlf
*.psd1 text eol=crlf
*.psc1 text eol=crlf
*.ps1xml text eol=crlf
*.clixml text eol=crlf
*.xml text eol=crlf
*.txt text eol=crlf
# Denote all files that are truly binary and should not be mergeable.
*.dll binary
*.exe binary
# Set default behaviour, in case users don't have core.autocrlf set.
* text=auto
# Explicitly declare text files we want to always be normalized and converted
# to native line endings on checkout.
*.gitattributes text
# Declare files that will always have CRLF line endings on checkout.
*.sln text eol=crlf
*.csproj text eol=crlf
*.pshproj text eol=crlf
*.cs text eol=crlf
*.xml text eol=crlf
*.txt text eol=crlf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment