IntelliJIDEA集成了对GitHub的支持使上传代码到GitHub和从GitHub下载代码更加方便快捷。一.分享代码到GitHub1.首先需要在Intell IntelliJ IDEA集成了对GitHub的支持使上传代码到GitHub和从GitHub下载代码

IntelliJ IDEA集成了对GitHub的支持使上传代码到GitHub和从GitHub下载代码更加方便快捷。
一. 分享代码到GitHub
1.首先需要在IntelliJ配置Git如果没有正确配置会出现如下错误

通过File->Settings打开设置面板进行设置如图

2. 第一次上传代码到GitHub操作如下

其间需要输入用户名和密码。
3. 非第一次上传代码需要像使用Git命令一样遵循Add->Commit->Push的方式。如图


其中Add这一步可以省略直接Commit->Push。
二. 从GitHub上clone代码
1.首先选择File->New->Project from Version Control->GitHub

2.上步操作会打开如下界面

在Git Repository URL输入需要clone的项目的url即可。
三. 提交代码GitHub
1.在git选项中就能进行代码同步的相应操作了下面以提交代码为例。首先右击要提交的

2.然后根据需要操作即可下面为简单操作说明

原文http://www.cnblogs.com/toutou/p/8097826.html