转载至:https://www.cnblogs.com/jinjiyese153/p/6796668.html
1.在github中创建一个账号:https://github.com/join?source=header-home
2.下载并安装git:https://git-scm.com/downloads
3.安装成功后打开Git Bash,输入下列命令,设置git全局用户名和邮箱
设置全局的git用户名
git configf user.name "your name"
设置全局配置邮箱
git config --global user.email "email@qq.com"
然后查看自己的邮箱和用户名
git config user.name
git config user.email
4.在IDEA中设置Git
在File–>Setting->Version Control–>Git–>Path to Git executable选择你的git安装后的git.exe文件,然后点击Test,测试是否设置成功
5. 然后添加Github账号
File–>Setting->Version Control–>GibHub