docs: 更新 README.md,添加 .gitattributes 使用说明
This commit is contained in:
7
.gitattributes
vendored
7
.gitattributes
vendored
@ -1,3 +1,10 @@
|
||||
# 如果你先推送了一个.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
|
||||
|
Reference in New Issue
Block a user