- 配置 pnpm workspace monorepo 基础结构 - 初始化 .blueprint/ 蓝图:6 个业务模块、21 张任务卡 - 目标:Z Fold 6 折叠屏不动产物品摸底统计 App(React Native + Expo) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
61 lines
1.8 KiB
Plaintext
61 lines
1.8 KiB
Plaintext
修复 Scoop Git 安装步骤
|
||
|
||
请在新终端(CMD 或 PowerShell)中逐条执行以下命令:
|
||
|
||
1. 检查并修复 7zip shim
|
||
打开文件 E:\Scoop\shims\7z.shim,确保内容为:
|
||
path = "E:\Scoop\apps\7zip\25.01\7z.exe"
|
||
|
||
如果不同,请编辑或运行:
|
||
echo path = "E:\Scoop\apps\7zip\25.01\7z.exe" > "E:\Scoop\shims\7z.shim"
|
||
|
||
2. 创建 7zip current 符号链接
|
||
以管理员身份运行 CMD,执行:
|
||
mklink /J "E:\Scoop\apps\7zip\current" "E:\Scoop\apps\7zip\25.01"
|
||
|
||
如果无法创建符号链接,可以直接跳过此步,但需确保后续使用绝对路径。
|
||
|
||
3. 手动提取 Git 安装包
|
||
在 PowerShell 中执行:
|
||
& "E:\Scoop\apps\7zip\25.01\7z.exe" x "E:\Scoop\apps\git\2.53.0.2\dl.7z" -o"E:\Scoop\apps\git\2.53.0.2" -y
|
||
|
||
等待提取完成。
|
||
|
||
4. 检查提取结果
|
||
执行:
|
||
dir "E:\Scoop\apps\git\2.53.0.2"
|
||
|
||
应该看到 bin、cmd、etc 等目录。
|
||
|
||
5. 创建 Git shim 文件
|
||
创建 E:\Scoop\shims\git.shim:
|
||
echo path = "E:\Scoop\apps\git\2.53.0.2\bin\git.exe" > "E:\Scoop\shims\git.shim"
|
||
|
||
创建 shim 可执行文件:
|
||
copy "E:\Scoop\shims\7z.exe" "E:\Scoop\shims\git.exe"
|
||
|
||
6. 创建 sh (bash) shim
|
||
echo path = "E:\Scoop\apps\git\2.53.0.2\bin\sh.exe" > "E:\Scoop\shims\sh.shim"
|
||
|
||
7. 创建 git-bash shim
|
||
echo path = "E:\Scoop\apps\git\2.53.0.2\git-bash.exe" > "E:\Scoop\shims\git-bash.shim"
|
||
|
||
8. 更新 PATH 环境变量(临时)
|
||
在 PowerShell 中执行:
|
||
$env:Path = "E:\Scoop\shims;$env:Path"
|
||
|
||
9. 测试安装
|
||
执行:
|
||
git --version
|
||
sh --version
|
||
|
||
如果显示版本信息,则安装成功。
|
||
|
||
10. 永久添加 PATH(可选)
|
||
将 E:\Scoop\shims 添加到系统 PATH 环境变量:
|
||
[Environment]::SetEnvironmentVariable("Path", "E:\Scoop\shims;" + [Environment]::GetEnvironmentVariable("Path", "User"), "User")
|
||
|
||
重启终端使更改生效。
|
||
|
||
如果仍有问题,可以临时使用完整路径:
|
||
E:\Scoop\apps\git\2.53.0.2\bin\git.exe |