1.定位、
cd (文件夹)
2.git init

(******** 如上传第二个项目则忽略345步 **************)
3.创建ssh 文件
ssh-keygen -t rsa -C"邮箱"



4.将 ssh 代码复制到剪贴板 (终端中打开ssh文件夹 open ~/.ssh)
pbcopy < ~/.ssh/xxx.pub xxx(文件名)
5.验证ssh是否添加
ssh -T git@github.com
6.验证用户名和邮箱
git config --global user.name"your name"
git config --global user.email"your_email@youremail.com"
7.git status
git add . (此处有 . 注意)
git commit -m "更新描述"
git remote add origin git@github.com:用户名/项目名.git

git push -forigin master
二.
下载项目 git clone git地址
打开项目 open .
显示项目地址 pwd
三.
更新项目
git add . (此处有 . 注意)
git commit -m "更新描述"
git remote add origin git@github.com:用户名/项目名.git (如remote origin already exist 则直接下一步)
git push
网友评论