42 lines
1.1 KiB
Plaintext
42 lines
1.1 KiB
Plaintext
# 如果你先推送了一个.jpg文件,然后再推送包含.gitattributes文件的更新,Git不会自动重新处理之前的.jpg文件的属性。为使.gitattributes中的新规则生效,你可以通过以下步骤重新应用设置:
|
|
|
|
# 1. 删除本地缓存的.jpg文件:git rm --cached <file>.jpg
|
|
# 2. 重新添加该文件:git add <file>.jpg
|
|
# 3. 再次提交并推送:git commit -m "Apply .gitattributes changes" && git push
|
|
|
|
# 这样,Git将按照.gitattributes中的新规则处理该文件。
|
|
* text=auto
|
|
|
|
# Force the following filetypes to have unix eols, so Windows does not break them
|
|
*.* text eol=lf
|
|
|
|
# Separate configuration for files without suffix
|
|
LICENSE text eol=lf
|
|
Dockerfile text eol=lf
|
|
pre-commit text eol=lf
|
|
commit-msg text eol=lf
|
|
|
|
# These files are binary and should be left untouched
|
|
# (binary is a macro for -text -diff)
|
|
*.ico binary
|
|
*.jpg binary
|
|
*.jpeg binary
|
|
*.png binary
|
|
|
|
*.pdf binary
|
|
*.doc binary
|
|
*.docx binary
|
|
*.ppt binary
|
|
*.pptx binary
|
|
*.xls binary
|
|
*.xlsx binary
|
|
|
|
*.exe binary
|
|
*.jar binary
|
|
|
|
*.ttf binary
|
|
*.woff binary
|
|
*.woff2 binary
|
|
*.eot binary
|
|
*.otf binary
|
|
# Add more binary... |