本地提交文档到github 云仓库 流程
1. git init #设定一个文件为本地仓库,将提交的文档放在其中
2. git add . #添加文件到仓库中
3. git commit #提交 添加 进入编辑时 i esc :wq 即可退出
4. git remote add origin (github仓库地址) #添加需要提交到仓库的地址
5. git pull origin master --allow-unrelated-histories #将云仓库拉下来到本地仓库
6. git push origin master:master #将本地仓库提交到云仓库
git clone #复制资源
有时候会出现秘钥丢失的问题,解决思路
1.在git中 输入用户名和邮箱
git config --global user.name "xuserx"
git config --global user.email "xemailx"
2. 在用户中删除 .ssh文件中的known_hosts
3.git输入命令
ssh-keygen -t rsa -C "xemailx"
输入两次密码
接下来将.ssh的.pub文件复制到github中的sshkey中
4.ssh -T git@github.com
game over