eclipse中代码push到github每次要输入github仓库地址

来源:互联网 发布:app相册制作软件 编辑:程序博客网 时间:2024/05/17 23:09

问题描述:每次想将项目代码push到远程仓库的时候,都需要location指定github仓库的地址,十分麻烦。


方式一:

windows->preferences->Team->Git->Configuration->Repository setting->add Entry

输入key:remote.url

输入value:github.com:XXX/XXX.git


方式二:

windows->preferences->Team->Git->Configuration->Repository setting->Repository下拉选择你的项目->open

打开你的git配置文件

文件改变如下:

[core]
symlinks = false
repositoryformatversion = 0
filemode = false
logallrefupdates = true
[remote]
url = github.com:XXX/XXX.git


提示:要避免每次输入github账号和密码,Store in Secure Store选项打上勾。


总结:这两种方式其实本质上是一样的,都是改变了git配置文件,在需要push的时候eclipse会自动去读取配置文件,避免了每次都手动输入的尴尬。

阅读全文
0 0
原创粉丝点击