#!/bin/bash # 检查 git 是否安装 if command -v git > /dev/null 2>&1; then echo "git 已安装,正在配置镜像源..." # 曾经设置过的强制取消 git config --global --unset url."https://git-proxy.hk.martin98.com/".insteadOf git config --global url."https://git.mirrors.martin98.com/https://github.com/".insteadOf "https://github.com/" echo "镜像源配置完成。" else echo "git 不存在,跳过..." fi