eclipse 项目代码提交码云
1、 注册账号,登录码云
2、创建项目
3、进入创建好的项目,赋值http地址
4、右键项目,team-----> share project,创建本地仓库
5、建立push连接
6、填写git远程仓库地址,账号,口令
此处可能会报错,如果点next报 cannot open git-upload-pack 这个错
打开eclipse中的windows-->Preferences-->Team-->Git-->Configuration-->User Settings.然后点Add Entry新建一个键值对,输入http.sslVerify=false。亲测可用
7、添加提交分支
到这里和git的链接就基本结束配置结束了,接下来是提交代码了,提交代码前需要从远程仓库pull
8、pull
pull的时候可能会遇到 The current branch is not configured for pull这个报错
一. 找到项目目录的 .git文件夹 下的 config文件
二. 配置添加一下配置即可
[core]
repositoryformatversion = 0
filemode = false
logallrefupdates = true
[branch "master"]
remote = origin
merge = refs/heads/master
[remote "origin"]
url = https://github.com/androidzhaoxiaogang/rocket.git (修改为自己的url)
fetch = +refs/heads/*:refs/remotes/origin/*
三. 重新pull
9、提交本地仓库commit
如果是选择commit and push 则不需要 push to upstream,因为资源已经被提交到远程仓库
9、点击commit后,push to upstream提交到远成仓库