
1. 查看当前 LFS 的远程地址
bash
复制
git lfs env | grep Endpoint你会看到类似:
Endpoint=http://192.168.3.36/makeup/classicparking.git/info/lfs (auth=basic)
2. 修改 LFS 的远程地址
使用以下命令将 LFS 的地址改为 http://100.125.163.56:
bash
复制
git config lfs.url http://100.125.163.56/makeup/classicparking.git/info/lfs=================================================================
=================================================================
要从 Git LFS 中取消对 .tif 格式文件的管理,你需要:
- 
从 .gitattributes中移除相关配置
- 
重新将 .tif文件以普通文件形式提交(可选,取决于你是否希望这些文件继续存在于 Git 历史中)
✅ 步骤如下:
1. 编辑 .gitattributes 文件,移除 .tif 的 LFS 配置
打开 .gitattributes 文件,找到类似下面这行:
gitattributes
复制
*.tif filter=lfs diff=lfs merge=lfs -text将其删除或注释掉(加 # 号):
gitattributes
复制
# *.tif filter=lfs diff=lfs merge=lfs -text2. 提交 .gitattributes 的修改
bash
复制
git add .gitattributes
git commit -m "Stop tracking .tif files with Git LFS"3. 可选:将现有 .tif 文件从 LFS 中"解放"出来
如果你希望已存在的 .tif 文件也脱离 LFS 管理,需要:
bash
复制
git rm --cached *.tif
git add *.tif
git commit -m "Convert .tif files back to regular Git objects"⚠️ 注意:这一步会重新将
.tif文件以普通文件形式提交,可能导致仓库变大。
✅ 验证是否成功
运行以下命令确认 .tif 文件不再被 LFS 追踪:
bash
复制
git lfs ls-files如果不再看到 .tif 文件,就说明已成功取消 LFS 管理。
✅ 补充建议
- 
如果你只是希望新文件不再使用 LFS ,但保留历史的 .tif文件在 LFS 中,可以跳过第 3 步。
- 
如果你使用的是 .tiff扩展名,也请一并检查.gitattributes中是否有对应配置。