@(Alu)
1.码云创建项目


注意: 建议不要勾选,码云默认勾选,去掉,勾选可能导致后续提交一直被拒
我创建了一个叫SimpleBook
的项目,创建完成后如图:

点击HTTPS 拿到项目地址,然后码云就ok 了
2.本地初始化Git仓库以及提交到码云
在我们项目的根目录右键点击 Git Bash Here

出现
Git
命令行:

依次输入以下命令:
git config --global user.name "引号内的文字替换为你的码云用户名"
git config --global user.email "引号内的文字替换为你的邮箱"
这两句为 Git 全局设置(如果设置过,这两句可跳过)
git init //初始化你该项目的git 仓库
touch README.md //创建README.md文件
git add -A //添加所有文件
git commit -a -m "替换为你的注释内容" //就是每次提交之后的改动注释
git remote rm origin //以防万一先删再加 删除该项目远程仓库
git remote add origin https://git.oschina.net/alucode/SimpleBook.git //这一步就要用到之前码云的项目地址了,对没错,
将`origin` 后的地址替换为你的项目地址
git push origin master //将项目提交到你的远程仓库的`master`分支
输入你的账号回车,弹出如下图:

输入你码云的用户密码配对SSH
回车, 成功。
另外附上配置 SSH
的教程: http://blog.csdn.net/dlg1992/article/details/51290604.
网友评论