windows - 如何在 Windows 上安装 Git Large File Storage?

标签 windows git github git-lfs large-file-support

根据其doc ,双击应该就够了。但是当我打开 git bash 并运行 git lfs init 时,它不起作用:

$ git lfs init
git: 'lfs' is not a git command. See 'git --help'.

最佳答案

“git lfs”不是 git 命令的唯一原因是 git-lfs.exe 没有放在你的 %PATH% 中.

这就是 git-lfs-windows-amd64-0.5.3\install.bat 应该做的。

set GIT_LFS_BIN_PATH="%LOCALAPPDATA%\GitLFS\bin"
IF EXIST %GIT_LFS_BIN_PATH% GOTO DIRECTORY_EXISTS
mkdir %GIT_LFS_BIN_PATH%
set "path=%PATH%;%GIT_LFS_BIN_PATH:"=%"

所以:

  • 确保install.bat 成功执行
  • 检查“%LOCALAPPDATA%\GitLFS\bin”的内容
  • 确保打开一个新的 CMD 窗口
  • 检查你的 %PATH% 环境变量

关于windows - 如何在 Windows 上安装 Git Large File Storage?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31757743/

相关文章:

windows - 使用脚本清除 Internet Explorer 6.0 浏览历史记录

github - 为 Homebrew 设置 Github API token

windows - 找不到任何 Direct3D 12 示例

git - 如何查看 git 索引的变化?

c# - .gitignore 和 Visual Studio 项目 : Ignore bin/Debug directory but not bin/Release directory

linux - 限制对 git 服务器目录的访问?

git - 使用 GPG 签署现有提交

git - 如何将主分支与另一个分支及其提交一起切换?

windows - 文本文件的元数据

c++ - WinAPI 鼠标单击无法正常工作