git commit出错
2017-06-11 09:37
204 查看
业务场景:使用git提交readme.txt文件,结果出现如下提示:
[pms@yhd-jqhadoop39 /home/pms/workspace/ouyangyewei/learngit]
$git commit -m 'add readme.txt'
*** 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 <pms@yhd-jqhadoop39.int.yihaodian.com>) not allowed
原因:如上述提示,git未设置用户信息
解决方法:设置user.email和user.name即可
$git config --global user.name "ouyangyewei"
$git config --global user.email "ouyangyewei@yhd.com"
[pms@yhd-jqhadoop39 /home/pms/workspace/ouyangyewei/learngit]
$git config --list
user.name=ouyangyewei
user.email=ouyangyewei@yhd.com
core.repositoryformatversion=0
core.filemode=true
core.bare=false
core.logallrefupdates=true
[pms@yhd-jqhadoop39 /home/pms/workspace/ouyangyewei/learngit]
$ls
readme.txt
[pms@yhd-jqhadoop39 /home/pms/workspace/ouyangyewei/learngit]
$git commit -m 'add readme.txt'
[master (root-commit) 3e48caa] add readme.txt
1 file changed, 2 insertions(
[pms@yhd-jqhadoop39 /home/pms/workspace/ouyangyewei/learngit]
$git commit -m 'add readme.txt'
*** 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 <pms@yhd-jqhadoop39.int.yihaodian.com>) not allowed
原因:如上述提示,git未设置用户信息
解决方法:设置user.email和user.name即可
$git config --global user.name "ouyangyewei"
$git config --global user.email "ouyangyewei@yhd.com"
[pms@yhd-jqhadoop39 /home/pms/workspace/ouyangyewei/learngit]
$git config --list
user.name=ouyangyewei
user.email=ouyangyewei@yhd.com
core.repositoryformatversion=0
core.filemode=true
core.bare=false
core.logallrefupdates=true
[pms@yhd-jqhadoop39 /home/pms/workspace/ouyangyewei/learngit]
$ls
readme.txt
[pms@yhd-jqhadoop39 /home/pms/workspace/ouyangyewei/learngit]
$git commit -m 'add readme.txt'
[master (root-commit) 3e48caa] add readme.txt
1 file changed, 2 insertions(
相关文章推荐
- git commit 出错
- git迁移到svn时原有历史提交中出现过冲突导致git svn dcommit出错的解决办法
- Mac下Git Commit时出错的一种解决方法
- git commit出错
- git commit 提交注释规范
- git reflog 恢复删除的commit
- github-git push 出错
- 如何写好 Git Commit 信息
- git-commit
- git 修改commit
- idea使用 git 撤销commit
- git 删除错误提交的commit
- Git-撤销commit
- git commit style
- Git for windows安装出错的解决办法
- 如何把Git的某个commit提交到指定的本地分支和远程分支
- ubuntu安装git出错分析
- 使用git commit 命令提交跟踪的新文件时 提示 *** Please tell me who you are.
- 使用git commit命令时遇到 fatal: Unable to create index.lock File exists 错误的解决办法
- git commit 取消