美文网首页
IDEA关联github

IDEA关联github

作者: 念_ae7b | 来源:发表于2018-09-26 21:52 被阅读0次

第一步:去你安装的git根目录查看是否有.ssh文件,如有没有就进入git bash输入命令:ssh-keygen -t rsa -C "你的github邮箱",然后就会有.ssh文件。  如图:

第二步:获取id_rsa.pub里面的内容到github->settings->SSH and GPG keys里面new一个 sshkey ,名字自定义


第三步:在github上创建一个repository,头像->new repositorys,取好项目名,一路默认。


第四步:进入GIT CMD,进入文件夹,输入:git remote add origin git@github.com:你的github名字/github项目名.git,如果报错,可以看看idea的remote里面是不是有重名。然后在输出git push -u origin master,这样里的项目就已经提交成功。

第五步:如果项目发生改变:

 git add  文件名字 

 git commit -m "备注"

git push -u origin master

相关文章

网友评论

      本文标题:IDEA关联github

      本文链接:https://www.haomeiwen.com/subject/pyajoftx.html