在github上创建好仓库后,在本地创建一个仓库
1.先要初始化本地仓库
git config --global user.name ‘you name‘git config --global user.email ‘you email‘
2.添加密钥
1.生成密钥
ssh-keygen -t rsa -C "your name" ?#引号里输入你的用户名
2.查看密钥,使用 cat ,复制密钥
3.在github上添加密钥
点击用户头像 --setting -- ssh and GPG keys
3.上传
git init把项目移动本地仓库git add .git commit -m ‘提交‘git remote add origin ?<you ?rep url>git push
4.删除
git rm -r --cached <文件>git commit -m ‘删除‘git push
github 上传与删除项目
原文地址:https://www.cnblogs.com/sineik/p/9216825.html