Git is driving me crazy!

This is the link.

I do the following on the command line and I can’t figure out how to log in. I think this has something to do with me attempting to make my repository private, unlike in the tutorial from Codecademy.

(base) ben@ben-Aspire-TC-885:~$ cd git_practice
(base) ben@ben-Aspire-TC-885:~/git_practice$ git init
Reinitialized existing Git repository in /home/ben/git_practice/.git/
(base) ben@ben-Aspire-TC-885:~/git_practice$ 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:   README.txt

Changes not staged for commit:
  (use "git add/rm <file>..." to update what will be committed)
  (use "git checkout -- <file>..." to discard changes in working directory)

	deleted:    README.md

(base) ben@ben-Aspire-TC-885:~/git_practice$ 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"

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 'ben@ben-Aspire-TC-885.(none)')
(base) ben@ben-Aspire-TC-885:~/git_practice$ 

This is a picture of the part I think I changed which caused the problem. I tried to make the repository private, unlike in the original tutorial.

Thanks in advance for the help!!

Have you tried running the suggested commands yet?

image

I tried that and it didn’t work. Here is the log.

(base) ben@ben-Aspire-TC-885:~$ cd git_practice
(base) ben@ben-Aspire-TC-885:~/git_practice$ ls
README.txt
(base) ben@ben-Aspire-TC-885:~/git_practice$ git init
Reinitialized existing Git repository in /home/ben/git_practice/.git/
(base) ben@ben-Aspire-TC-885:~/git_practice$ 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:   README.txt

Changes not staged for commit:
  (use "git add/rm <file>..." to update what will be committed)
  (use "git checkout -- <file>..." to discard changes in working directory)

	deleted:    README.md

(base) ben@ben-Aspire-TC-885:~/git_practice$ 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"

to set your account's default identity.
Omit --global to set the identity only in this repository.
(base) ben@ben-Aspire-TC-885:~/git_practice$ git config --global user.e-mail "Talruk@gmail.com"
(base) ben@ben-Aspire-TC-885:~/git_practice$ git config --global user.name "Benjamin"
(base) ben@ben-Aspire-TC-885:~/git_practice$ 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:   README.txt

Changes not staged for commit:
  (use "git add/rm <file>..." to update what will be committed)
  (use "git checkout -- <file>..." to discard changes in working directory)

	deleted:    README.md

(base) ben@ben-Aspire-TC-885:~/git_practice$ git log
fatal: your current branch 'master' does not have any commits yet
(base) ben@ben-Aspire-TC-885:~/git_practice$ 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"

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 'ben@ben-Aspire-TC-885.(none)')
(base) ben@ben-Aspire-TC-885:~/git_practice$ git config --global user.email "Talruk@gmail.com"
(base) ben@ben-Aspire-TC-885:~/git_practice$ git config --global user.name "Benjamin"
(base) ben@ben-Aspire-TC-885:~/git_practice$ git log
fatal: your current branch 'master' does not have any commits yet

You’d need to commit AFTER setting your name and email. Not BEFORE because at that point you’ve still not addressed the problem.

…since you’ve now set those things, commit
and, if you meant to delete README.md, then you may want to add that change so that it gets included in the commit.

It worked! Thank you!!