Mac 上Github 上传本地文件(http方式)

如果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

发布了46 篇原创文章 · 获赞 9 · 访问量 1万+

猜你喜欢

转载自blog.csdn.net/weixin_43826596/article/details/100546820