Mac系统自带git但是跟xcode绑定的,平时不用xcode开发iosapp,可以采用安装xcode方法安装git步骤如下
1、xcode-select --install 单独安装CommandLineTools

2、sudo xcode-select --switch /Library/Developer/CommandLineTools

然后输入git version

git version 2.11.0 (Apple Git-81)
git安装成功

配置githubgiteessh

git config --global user.name "lianchor"
git config --global user.email "邮箱账号"
ls -a
ssh-keygen -t rsa -C 邮箱账号

连续按回车
在这里插入图片描述

cat /Users/lianchor/.ssh/id_rsa.pub
ssh -T git@github.com
ssh -T git@gitee.com

配置成功
在这里插入图片描述
在这里插入图片描述

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注