打开file->settings->version control->github ,填写github的用户名和密码,点击test可以测试连接 点击vcs->import into version control->create git repository, 创建本地仓库 选择当前项目路径 添加文件到本地仓库 点击vcs->import into version control->share project on github 填写名字描述,即可在自己的github上看到 commit的话,点击vcs->commit changes就能选择需要commit的文件