idea 上传项目到GitHub遇到的坑
2017-07-18 16:55
190 查看
准备:
1、安装Git
2、注册GitHub
开始:
1、在Idea中,File-Settings-Version Control-git 中,设置git安装目录
2、添加GitHub账号,File-Settings-Version Control-GitHub,
添加账号密码,点击test,成功。
3、点击cvs-import into version control-share project on github
结果保错:
Can't finish GitHub sharing process
Successfully created project 'springboot' on GitHub, but initial commit failed:
*** Please tell me who you are.
Run
git config --global user.email "you@example.com"
git config --global user.name "Your Name"
to set your account's default identity.
Omit --global to set the identity only in this repository.
fatal: empty ident name (for <(null)>) not allowed
during executing git -c core.quotepath=false commit -m "Initial commit" --
打开GitHub,查看自己项目发现只创建了一个空的仓库,点击仓库名,进入仓库,
点击setting,拖动到最下面,点击delete this repository,输入仓库名称,点删除。
4、打开git安装目录,找到git bash,双击运行,执行命令
git config --global user.email "you@example.com"
git config --global user.name "Your Name"
上面的方法配置的是全局的用户名和邮箱!就是说如果没有单独为项目配置,那提交的所有项目全部都是这个名字和邮箱!不管是公司项目还是github,还是码云!
单独为项目配置的方法(全局和单独配置都存在的时候会默认使用项目单独配置的):
1.打开项目所在目录,找到隐藏的.git文件夹。注意这个文件夹是隐藏的,显示隐藏出来就行。
2.打开文件夹里的config文件,推荐用nodepad++打开。
3.添加这三行到文件:
当然也可以通过命令行的方式,只需要在 .git 文件夹下。 例如执行如下命令:
1、安装Git
2、注册GitHub
开始:
1、在Idea中,File-Settings-Version Control-git 中,设置git安装目录
2、添加GitHub账号,File-Settings-Version Control-GitHub,
添加账号密码,点击test,成功。
3、点击cvs-import into version control-share project on github
结果保错:
Can't finish GitHub sharing process
Successfully created project 'springboot' on GitHub, but initial commit failed:
*** Please tell me who you are.
Run
git config --global user.email "you@example.com"
git config --global user.name "Your Name"
to set your account's default identity.
Omit --global to set the identity only in this repository.
fatal: empty ident name (for <(null)>) not allowed
during executing git -c core.quotepath=false commit -m "Initial commit" --
打开GitHub,查看自己项目发现只创建了一个空的仓库,点击仓库名,进入仓库,
点击setting,拖动到最下面,点击delete this repository,输入仓库名称,点删除。
4、打开git安装目录,找到git bash,双击运行,执行命令
git config --global user.email "you@example.com"
git config --global user.name "Your Name"
上面的方法配置的是全局的用户名和邮箱!就是说如果没有单独为项目配置,那提交的所有项目全部都是这个名字和邮箱!不管是公司项目还是github,还是码云!
单独为项目配置的方法(全局和单独配置都存在的时候会默认使用项目单独配置的):
1.打开项目所在目录,找到隐藏的.git文件夹。注意这个文件夹是隐藏的,显示隐藏出来就行。
2.打开文件夹里的config文件,推荐用nodepad++打开。
3.添加这三行到文件:
[user] name = XXX(自己的名称) email = XXXX(邮箱)
当然也可以通过命令行的方式,只需要在 .git 文件夹下。 例如执行如下命令:
git config user.name "xxxxx"
相关文章推荐
- idea上传项目到gitHub
- IDEA怎样使用git将项目上传到github中
- Intellij idea上传项目到github
- idea 将项目上传到 github
- idea上传项目到github上面
- 在github上传项目遇到的问题(error: failed to push some refs to 'https://github.com/CrazyDony/text.git')
- IDEA创建项目及上传到github
- 4000 怎么用IDEA上传本地项目到码云/Github?
- 将IDEA中的项目上传到Github
- Intellij idea上传项目到github
- 使用IDEA将git上传项目到github
- 怎么用IDEA上传本地项目到码云/Github?
- IDEA配置github并上传项目
- 使用IDEA或Studio上传项目到Github中
- IDEA配置github并上传项目
- git上传本地Intellij idea 项目到github
- InteliJ IDEA上传项目到GitHub
- idea上传项目到GitHub
- IDEA配置github并上传项目
- 怎么用IDEA上传本地项目到码云/Github?