mirror of
https://github.com/ZhuLinsen/daily_stock_analysis
synced 2026-09-20 02:43:35 +08:00
chore(.gitattributes): 完善Git属性配置规范换行符与二进制文件处理——核心目的是解决拉取源代码 docker compose部署的时候的报错:stock-server | exec /usr/local/bin/docker-entrypoint.sh: no such file or directory (#1488)
为shell脚本、Dockerfile、Makefile和.env文件强制配置LF换行符,将证书密钥类二进制文件标记为binary以避免Git修改其编码
This commit is contained in:
22
.gitattributes
vendored
22
.gitattributes
vendored
@@ -19,3 +19,25 @@ docs/assets/**/*.jpg binary
|
||||
docs/assets/**/*.jpeg binary
|
||||
docs/assets/**/*.png binary
|
||||
docs/assets/**/*.psd binary
|
||||
|
||||
# === 强制 LF 的文件类型(内核/系统解释器直接消费) ===
|
||||
# Shell 脚本(entrypoint.sh、任何 .sh)
|
||||
*.sh text eol=lf
|
||||
*.bash text eol=lf
|
||||
|
||||
# Dockerfile(包括多阶段或变体)
|
||||
Dockerfile text eol=lf
|
||||
Dockerfile.* text eol=lf
|
||||
|
||||
# Makefile
|
||||
Makefile text eol=lf
|
||||
|
||||
# 环境变量文件(如果被 shell 直接 source 使用)
|
||||
.env text eol=lf
|
||||
|
||||
# === 新增:二进制文件(禁止 Git 修改换行/编码) ===
|
||||
# 证书、密钥等(如果有)
|
||||
*.pem binary
|
||||
*.crt binary
|
||||
*.key binary
|
||||
*.p12 binary
|
||||
Reference in New Issue
Block a user