Skip to content

Commit cc4f46f

Browse files
authored
Add .gitattributes to fix line endings for Windows devcontainer users (Azure-Samples#20)
1 parent 6eec09a commit cc4f46f

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

.gitattributes

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# Auto-detect text files and normalize to LF in the repo
2+
* text=auto
3+
4+
# Shell scripts must use LF (they run in Linux containers/devcontainers)
5+
*.sh text eol=lf
6+
entrypoint.sh text eol=lf
7+
8+
# Python files - LF is standard
9+
*.py text eol=lf
10+
11+
# Dockerfiles run in Linux
12+
Dockerfile text eol=lf
13+
14+
# Config files that might be used in containers
15+
*.yaml text eol=lf
16+
*.yml text eol=lf
17+
*.json text eol=lf
18+
*.toml text eol=lf
19+
*.bicep text eol=lf
20+
21+
# Windows scripts need CRLF
22+
*.bat text eol=crlf
23+
*.cmd text eol=crlf
24+
*.ps1 text eol=crlf
25+
26+
# Binary files
27+
*.png binary
28+
*.jpg binary
29+
*.gif binary
30+
*.ico binary

0 commit comments

Comments
 (0)