CodeBlanks Logo Icon CodeBlanks

Summary - Configuration

Combine config settings to verify the correct author info.

Configuration summary

In Git configuration, user.name and user.email settings determine who authored the changes. The --global option defines a general identity for your entire machine, while --local provides repo-specific settings.

git config --global user.name "Name"
git config --global user.email "email@domain.com"

You can check all configured settings anytime with git config --list.

Practice Global identity configuration

Configure the global user name as "Baris Arda" and global email as "baris@example.com". Then print both values sequentially.

Starter code

terminal
# Global ad ve e-posta ayarlarını yap ve ekrana yazdır

Sample solution

terminal
git config --global user.name "Baris Arda"
git config --global user.email "baris@example.com"
git config --global user.name
git config --global user.email

Expected output

Baris Arda
baris@example.com

Questions and answers

Review the lesson questions together with their answers. To test yourself, solve the lesson interactively.

1 Which command is used to define an email address that applies to all projects in Git?

  • git config --local user.email "dev@test.com"
  • git config --global user.email "dev@test.com" Correct answer
  • git config user.email --all "dev@test.com"
  • git config email "dev@test.com"

Explanation: To assign an email address valid across all projects, the `git config --global user.email` command is used.

2 Global name assignment

Question
git config --global ____ "Elif Yurt"
Answer
git config --global user.name "Elif Yurt"

Explanation: The standard Git key used to define the user name is `user.name`.

3 Configuration matching

Term Meaning
git config --list Dumps all settings
git config user.name Reads registered name
--global kapsamı User-level effect
--local kapsamı Repository-level effect

All lessons in Beginner