IDEA版本为9.2.4。方便以后参考
在IDEA中设置git,file --> settings… -->Version Control --> git 。选择好git.exe路径后点击Test。测试是否成功
2、在IDEA中设置gitHub,file --> settings… -->Version Control --> GitHub
点击右侧的“+” ,输入用户名和密码
3、创建本地仓库VCS --> Import into Version Control--> Create Git Repository...
4、在弹框中选择项目所在位置。点击ok。这个时候,你会发现项目项目中的文件变红
5、右击项目,点击Git --> add 。这个时候项目中的文件会变绿。文件存入git的缓存区
6、右击项目。点击Git --> Commit Directory…. 。养成好习惯,填写备注。在点击commit按钮。文件从缓存区提交到本地仓库
7、将本地仓库的内容提交到远程仓库GitHub。VCS --> Import into Version Control -->Share Project on gitHub。