- Bhumi
- 7 years ago
- Tips & Tricks
- 9 comments
- 23 years ago

Today I come with the quick solution of an issue when trying to commit the file to GitHub. Now I am using git for version control and allow you to save copies of the code to there, till now I was using SVN and TortoiseSVN for committing my WordPress plugins which you can find here.
I also have a public repository of my own on GitHub for my module in Joomla.
I am unable to commit to git, I get ‘**Please tell me who you are’ every-time.
|
git commit —m «resolved #1 testing of commit with message and issue id» phpinfo.php |
When try to commit the file to GitHub, got following error message.After I search in google, found that the problem I had that needs to pass my email addresses for different Git repositories.
|
*** 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 indent not allowed |
The solutions I found to this problem is I have Run the following command to set my user and email
|
git config —global user.email «test@youremail.com» git config —global user.name «Bhumi Shah» |
and this solved my problem.Hope this article helpful to someone.
Bhumi
Bhumi shah is currently working with leading web development company as a Software Analyst and also the founder of the Creativedev. She has immense interest in programming and web designing.She is passionate about technical blogging and almost versatile in terms of programming across various languages & frameworks such as PHP,MySQL WordPress, Twitter Bootstrap, AngularJS, HTML5, CSS3, jQuery and more.
-
VSCode Version: Version: 1.52.1 (user setup)
Commit: ea3859d
Date: 2020-12-16T16:34:46.910Z -
OS Version: Windows_NT x64 10.0.19041
Steps to Reproduce:
- Cloned github repo
- make changes to any file and save
- commit changes via Source Control
- Get this error: *** 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: no email was given and auto-detection is disabled
git config —get-all user.name
When I check the git config everything looks good: $ git config —list —show-origin
file:/home/victor/.gitconfig user.name=vicchimenti
file:/home/victor/.gitconfig user.email=myname@email.com
file:.git/config core.repositoryformatversion=0
file:.git/config core.filemode=false
file:.git/config core.bare=false
file:.git/config core.logallrefupdates=true
file:.git/config core.ignorecase=true
file:.git/config remote.origin.url=https://github.com/vicchimenti/law-newsroom.git
file:.git/config remote.origin.fetch=+refs/heads/:refs/remotes/origin/
file:.git/config branch.master.remote=origin
file:.git/config branch.master.merge=refs/heads/master
Does this issue occur when all extensions are disabled?: Yes/No Need the Git Hub extension active to use Source Control
ИМХО, правильный способ устранить эту ошибку — настроить глобальный файл конфигурации git.
Для этого выполните следующую команду: git config --global -e
Появится редактор, в который вы можете вставить настройки git по умолчанию.
Вот некоторые из них:
[user]
name = your_username
email = your_username@users.noreply.github.com
[alias]
# BASIC
st = status
ci = commit
br = branch
co = checkout
df = diff
Для получения дополнительной информации см. Настройка Git — конфигурация Git
Когда вы видите команду вроде git config …
$ git config --global core.whitespace
trailing-space,space-before-tab,indent-with-non-tab
… вы можете поместить это в свой глобальный файл конфигурации git как:
[core]
whitespace = space-before-tab,-indent-with-non-tab,trailing-space
Для одноразовых конфигураций вы можете использовать что-то вроде git config --global user.name 'your_username'
Если вы не устанавливаете свои конфигурации git глобально, вам нужно будет сделать это для каждого репозитория git, с которым вы работаете локально.
Настройки user.name и user.email сообщают git, кто вы, поэтому git commit команды не будут жаловаться, *** Please tell me who you are.
Много раз команды, которые git предлагает вам запустить, не являются теми, которые вы должны запускать. На этот раз предлагаемые команды неплохие:
$ git commit -m 'first commit'
*** Please tell me who you are.
Run
git config --global user.email "you@example.com"
git config --global user.name "Your Name"
Совет: Пока я не очень хорошо познакомился с git, создание резервной копии файла моего проекта — перед запуском предложенных команд git и исследованием вещей, которые, как я думал, будут работать, — не раз спасало мою жизнь.