Recall & Review
beginner
What is the difference between global and local configuration in Git?
Global configuration applies settings to all repositories for a user on a machine, while local configuration applies settings only to a specific repository.
Click to reveal answer
beginner
How do you set your user name globally in Git?
Use the command:
git config --global user.name "Your Name" to set your user name for all repositories.Click to reveal answer
beginner
How do you check the local Git configuration for a repository?
Run
git config --local --list inside the repository folder to see local settings.Click to reveal answer
intermediate
If a setting exists in both global and local Git configurations, which one takes effect?
The local configuration overrides the global configuration for that repository.
Click to reveal answer
intermediate
Where are Git global and local configuration files stored?
Global config is stored in
~/.gitconfig (user home directory). Local config is stored in .git/config inside the repository folder.Click to reveal answer
Which command sets a Git configuration only for the current repository?
✗ Incorrect
The --local flag sets configuration only for the current repository.
Where is the global Git configuration file located?
✗ Incorrect
The global config file is stored in the user's home directory as ~/.gitconfig.
If a Git setting is defined both globally and locally, which setting is used when working in that repository?
✗ Incorrect
Local settings override global settings for that repository.
What does the command
git config --list show by default?✗ Incorrect
It shows all Git configuration levels combined.
Which Git configuration level applies settings for all users on a system?
✗ Incorrect
System configuration applies to all users on the machine.
Explain the difference between Git global and local configuration and when you would use each.
Think about settings that apply everywhere vs. settings for one project.
You got /4 concepts.
Describe how Git decides which configuration to use if the same setting exists in multiple places.
Consider the scope of each config level.
You got /3 concepts.