如果Mac上安装了Xcode ,则自身已有git ,不要再安装git
上传有SSH和Http 两种方式,如果选择http方式,则暂时不需要配置.ssh
(1)在Github 在创建一个 repository(2)在终端上cd 上相应文件夹
(3)在终端输入
#初始化仓库 DeepLearningOpenCV表示在官网上建立的仓库名称
echo "# DeepLearningOpenCV" >> README.md
git init
#添加所有的文件至仓库,first committ是备注
git add .
git commit -m "first commit"
#上传至git上 https://github.com/yanni-code/DeepLearningOpenCV.git是建立的网址
git remote add origin https://github.com/yanni-code/DeepLearningOpenCV.git
git push -u origin master
可参考 https://www.jianshu.com/p/1d53a157e1df