[Git] Error prompt caused by Git not initialized, git error prompt
Business scenario: Use gitto submit the readme.txt file. The following message is displayed:
[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
Cause: As prompted above, git does not set user information
Solution: Set user. email and 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 --listuser.name=ouyangyeweiuser.email=ouyangyewei@yhd.comcore.repositoryformatversion=0core.filemode=truecore.bare=falsecore.logallrefupdates=true
[pms@yhd-jqhadoop39 /home/pms/workspace/ouyangyewei/learngit]$lsreadme.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(