参考博客 http://blog.youkuaiyun.com/gpwner/article/details/52829187 http://blog.youkuaiyun.com/gpwner/article/details/53140016
下载git 地址如下 https://git-scm.com/downloads
Push 自己的代码
1.git init 初始化一个git 仓库
2. ssh-keygen -t rsa -C "youremail@example.com" 生成sshkey
3. 将生成的SSHKey拷贝到GitHub上
4. ssh -T git@github.com 验证是否连接上了
5. git config --global user.name oldinaction #用户名 git config --global user.email oldinaction@qq.com #邮箱
6. git remote add origin git@github.com:oldinaction/demo.git #其中git@github.com:oldinaction/demo.git是我们github中demo项目的ssh地址
7. git push -u origin master 如果出现non-fast-forward的错误,这主要是git仓库中已经有一部分代码,所以它不允许你直接把你的代码覆盖上去。可能有的人在新建项
目配置项目信息时,将上图的新建README文件选项打钩了。解决办法:
git push --all -f #强推,即利用覆盖方式用你本地的代码替代git仓库内的内容 (团队合作禁止使用) 团队合作: 团队其他人 git clone git@github.com:Random07/BoaService.git