0% found this document useful (0 votes)
29 views2 pages

Labs 1

The user created a directory called labs1, initialized it as a Git repository, created and added a file called labs1.txt, but was unable to commit changes due to not having their user email and name configured globally for Git. They attempted to set the user name but still need to set the email address before being able to make their first commit.

Uploaded by

mesachit danai
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
29 views2 pages

Labs 1

The user created a directory called labs1, initialized it as a Git repository, created and added a file called labs1.txt, but was unable to commit changes due to not having their user email and name configured globally for Git. They attempted to set the user name but still need to set the email address before being able to make their first commit.

Uploaded by

mesachit danai
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

35845@LAPTOP-IP8SV8AD MINGW64 /c

$ mkdir labs1

35845@LAPTOP-IP8SV8AD MINGW64 /c
$ cd labs1

35845@LAPTOP-IP8SV8AD MINGW64 /c/labs1


$ git init
Initialized empty Git repository in C:/labs1/.git/

35845@LAPTOP-IP8SV8AD MINGW64 /c/labs1 (master)


$ vim labs1.txt

35845@LAPTOP-IP8SV8AD MINGW64 /c/labs1 (master)


$ git status
On branch master

No commits yet

Untracked files:
(use "git add <file>..." to include in what will be committed)
labs1.txt

nothing added to commit but untracked files present (use "git add" to track)

35845@LAPTOP-IP8SV8AD MINGW64 /c/labs1 (master)


$ git add labs1.txt
warning: LF will be replaced by CRLF in labs1.txt.
The file will have its original line endings in your working directory

35845@LAPTOP-IP8SV8AD MINGW64 /c/labs1 (master)


$ git commit -m "my first commit"

*** Please tell me who you are.

Run

git config --global user.email "[email protected]"


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 '35845@LAPTOP-IP8SV8AD.(none)')

35845@LAPTOP-IP8SV8AD MINGW64 /c/labs1 (master)


$ git log
fatal: your current branch 'master' does not have any commits yet

35845@LAPTOP-IP8SV8AD MINGW64 /c/labs1 (master)


$ git status
On branch master

No commits yet

Changes to be committed:
(use "git rm --cached <file>..." to unstage)
new file: labs1.txt

35845@LAPTOP-IP8SV8AD MINGW64 /c/labs1 (master)


$ git config-- global user.name " sachit"
git: 'config--' is not a git command. See 'git --help'.

35845@LAPTOP-IP8SV8AD MINGW64 /c/labs1 (master)


$ git config --global user.name sachit

35845@LAPTOP-IP8SV8AD MINGW64 /c/labs1 (master)


$ git commit -m "my first commit"

*** Please tell me who you are.


Run

git config --global user.email "[email protected]"


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 '35845@LAPTOP-IP8SV8AD.(none)')

35845@LAPTOP-IP8SV8AD MINGW64 /c/labs1 (master)


$ git log
fatal: your current branch 'master' does not have any commits yet

35845@LAPTOP-IP8SV8AD MINGW64 /c/labs1 (master)


$

You might also like