github 上传与删除项目

在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

 

posted @ 2018-06-23 11:58  sneike  阅读(144)  评论(0编辑  收藏  举报