Fatal error: Please tell me who you are ))


#1

Re this https://www.codecademy.com/courses/learn-git/lessons/git-workflow/exercises/git-commit?action=resume_content_item.
why the following fatal message is shown:
What should I do?
Thanks for your support.

Admin@User-PC MINGW64 /c/users/admin/desktop/html/halimjon.com (master)
$ git commit -m "Complete first line of dialogue"

*** 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: unable to auto-detect email address (got 'Admin@User-PC.(none)')

:slight_smile:


#2

the output tells you need to set your email address and username:

  git config --global user.email "you@example.com"
  git config --global user.name "Your Name"

#3
Admin@User-PC MINGW64 /c/users/admin/desktop/html/halimjon.com (master)
$ git config --global User-PC.Halim

Admin@User-PC MINGW64 /c/users/admin/desktop/html/halimjon.com (master)
$ git config --global User-PC.halimjonik@gmail.com

Admin@User-PC MINGW64 /c/users/admin/desktop/html/halimjon.com (master)
$ git commit -m "Complete first line of dialogue"

*** 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: unable to auto-detect email address (got 'Admin@User-PC.(none)')

Admin@User-PC MINGW64 /c/users/admin/desktop/html/halimjon.com (master)
$

#4

user.email and user.name should be part of the commands, how else does git knows what you are setting?


#5

:ok_hand:

Admin@User-PC MINGW64 /c/users/admin/desktop/html/halimjon.com (master)
$ git config --global user.email "halimjonik@gmail.com"

Admin@User-PC MINGW64 /c/users/admin/desktop/html/halimjon.com (master)
$ git config --global user.name “Halim”

Admin@User-PC MINGW64 /c/users/admin/desktop/html/halimjon.com (master)
$ git commit -m “Complete first line of dialogue”
[master (root-commit) 2db27db] Complete first line of dialogue
1 file changed, 2 insertions(+)
create mode 100644 scene-1.txt


#6

I quite didn’t understand why do we need commit message like here:

Admin@User-PC MINGW64 /c/users/admin/desktop/html/halimjon.com (master)
$ git log
commit 2db27dba228a6782fc38a61613003ab4bb6195f4 (HEAD -> master)
Author: Halim halimjonik@gmail.com
Date: Sat Mar 16 12:24:13 2019 +0300

Complete first line of dialogue

#7

Git message are useful to quickly to gain an overview of what changes are made, which is why commit messages should be descriptive. Especially when you work with other people at a project