fatal: not a valid object name: 'master'

665 views
Skip to first unread message

David Hall

unread,
Sep 15, 2023, 1:59:11 PM9/15/23
to git-for-windows
Hello,

I have an error msg from git which I don't understand.

I have been following  Git-Tutorial in www.w3schools.com and have
been progressing nicely. However when I write the command for a new branch
I get an error message which is not what the tutorial tells me should happen.

Since it is a tutorial I cannot ask why and must fix this myself.

At the end of the following comes the error.

#######################################################

David Hall@Ralph MINGW64 ~/myproject (master)
$ git status
On branch master

No commits yet

Changes to be committed:
  (use "git rm --cached <file>..." to unstage)
        new file:   README.md
        new file:   bluestyle.css
        new file:   index.html

Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git restore <file>..." to discard changes in working directory)
        modified:   index.html


David Hall@Ralph MINGW64 ~/myproject (master)
$ git status --short
A  README.md
A  bluestyle.css
AM index.html

David Hall@Ralph MINGW64 ~/myproject (master)
$ git commit -a -m "Updated index.html with a new line"
warning: in the working copy of 'index.html', LF will be replaced by CRLF the next time Git touches it
Author identity unknown

*** Please tell me who you are.

Run

  git config --global user.email "y...@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 'David Hall@Ralph.(none)')

David Hall@Ralph MINGW64 ~/myproject (master)
$ git status
On branch master

No commits yet

Changes to be committed:
  (use "git rm --cached <file>..." to unstage)
        new file:   README.md
        new file:   bluestyle.css
        new file:   index.html

Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git restore <file>..." to discard changes in working directory)
        modified:   index.html

David Hall@Ralph MINGW64 ~/myproject (master)
$ git branch

David Hall@Ralph MINGW64 ~/myproject (master)
$ git branch hello-world-images
fatal: not a valid object name: 'master'   !!!!!!!!!!!!!!!

###################################################################

What kind of object is 'master'.
and why does it constantly ask : *** Please tell me who you are.

If this tutorial website had a forum or some such I would
write to them.

I hope you can help me on this issue.

D.Hall

Johannes Sixt

unread,
Sep 15, 2023, 2:33:26 PM9/15/23
to David Hall, git-for-windows
Am 15.09.23 um 19:59 schrieb David Hall:
> David Hall@Ralph MINGW64 ~/myproject (master)
> $ git commit -a -m "Updated index.html with a new line"
> warning: in the working copy of 'index.html', LF will be replaced by
> CRLF the next time Git touches it
> Author identity unknown
>
> *** Please tell me who you are.
>
> Run
>
>   git config --global user.email "y...@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 'David Hall@Ralph.(none)')

Looks like you ignored this error and did not follow the guidance that
you were given. Do that, and only then proceed with the tutorial.

-- Hannes

Reply all
Reply to author
Forward
0 new messages