失眠网,内容丰富有趣,生活中的好帮手!
失眠网 > eclipse git 上传工程 提交项目到 github

eclipse git 上传工程 提交项目到 github

时间:2020-04-30 02:52:08

相关推荐

eclipse git 上传工程 提交项目到 github

独角兽企业重金招聘Python工程师标准>>>

1.在new repository

2.在eclipse中new project比如:Test项目

3.右击"Test"->Team->share project...->select a repository type:Git

勾选Use or create repository in parent folder of project

点击Create Repository->Finish

这时候打开在workspace中的Test目录会发现多了一个.git文件夹。

4.右击"Test"->Team->commit 本地提交

5.再右击"Test"->Team->Remote->Push

URI就是github上面指定的地址:

username和password就是github网站的用户名和密码

5.finish

source ref 选择 refs/heads/masterdestination ref会自动填充,点击Add Spec勾选Focus update

开始提交。

6.可以刷新网页查看提交的代码了。。。

另一端用git下载 不啰嗦了就是 import-- git -- projects from Git -- URL --- 写上URl User和Password就可

代码更改后,commit 然后 remote -- push 如果提示错误‍‍cannot open git-upload-pack问题‍‍

打开eclipse中的windows-->Preferences-->Team-->Git-->Configuration-->User Settings.然后点Add Entry新建一个键值对,输入http.sslVerify=false。

代码更新如果pull 错误 The current branch is not configured for pull No value for key branch.master.merge found in config

找到工程下 .git文件找到 config

repositoryformatversion = 0

filemode = false

logallrefupdates = true

[branch "master"]

remote = origin

merge = refs/heads/master

[remote "origin"]

url = /cicue/android.git (修改为自己的url)

fetch = +refs/heads/*:refs/remotes/origin/*

保存后 重新pull可以更新代码

如果觉得《eclipse git 上传工程 提交项目到 github》对你有帮助,请点赞、收藏,并留下你的观点哦!

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。