warning:|warning: templates not found /user/local/git/share/git-core/templates, Mac环境Git Clone时遇到的问题
在 Mac上用SourceTree 克隆新项目时, 出现了warning: templates not found /user/local/git/share/git-core/templates
警告,导致克隆失败。
看到一些搜索的信息好像是说因为是Git克隆SVN项目?,老项目也不知道一开始是不是托管在SVN,咱也不知道,咱也不敢问。只能默默解决。
网上搜索的结果大多是,重新安转git,移动git目录,或者一些不清不楚的。
最后经过测试,找到了详细的步骤。
在终端输入
sudo mkdir /usr/local/git
确保上级目录存在,不然就 sudo mkdir -p /usr/local/git
sudo mkdir /usr/local/git/share
sudo mkdir /usr/local/git/share/git-core
sudo mkdir /usr/local/git/share/git-core/templates
sudo chmod -R 755 /usr/local/git/share/git-core/templates
前四条创建目录,最后一条给修改目录添加权限. 注意 sudo 创建目录需要输入当前 Mac用户的密码。
如果用指令无法创建出目录,手动创建也是一样,只是要注意文件名不能错!!!
【warning:|warning: templates not found /user/local/git/share/git-core/templates, Mac环境Git Clone时遇到的问题】再次克隆就应该没问题了。
推荐阅读
- (If)|(If) 404 Not Found
- cannot|cannot be read or is not a valid ZIP file
- nottodo,别做什么比计划做什么更重要
- 由Uncaught|由Uncaught TypeError: this.player.startMoveAt is not a function引申
- 运行报错Cannot|运行报错Cannot find module '@babel/compat-data/corejs3-shipped-proposals’
- iOS【NotificationContent-App|iOS【NotificationContent-App Group共享】
- Android|Android Notification
- Android|Android O 8.0及其以上系统的通知(Notification)、安装apk问题更新后的简单兼容写法
- weex|weex run ios 报错 /bin/sh: pod: command not found 解决方案
- Checked#15:|Checked#15: Evernote 真的要被替代了么()