Recall & Review
beginner
What is the purpose of the
.gitconfig file?The
.gitconfig file stores configuration settings for Git, such as user info, aliases, and behavior preferences.Click to reveal answer
beginner
How are sections defined in a
.gitconfig file?Sections are defined using square brackets, like
[section]. For example, [user] groups user-related settings.Click to reveal answer
beginner
What is the syntax to set the user email in
.gitconfig?Inside the
[user] section, use email = your.email@example.com to set the user email.Click to reveal answer
intermediate
How can you define a command alias in
.gitconfig?Use the
[alias] section and add lines like co = checkout to create shortcuts for Git commands.Click to reveal answer
intermediate
What is the difference between system, global, and local
.gitconfig files?System config applies to all users on the machine, global config applies to the current user, and local config applies to a specific repository.
Click to reveal answer
Which symbol is used to define a section in a
.gitconfig file?✗ Incorrect
Sections in
.gitconfig are defined using square brackets, for example, [user].Where is the global
.gitconfig file usually located?✗ Incorrect
The global
.gitconfig file is typically found in the user's home directory, like ~/.gitconfig.How do you set your Git username in the
.gitconfig file?✗ Incorrect
The correct syntax is
[user] section with name = YourName.What section would you use to create a shortcut for the Git command
checkout?✗ Incorrect
The
[alias] section is used to define shortcuts for Git commands.Which
.gitconfig file has the highest priority when Git reads configurations?✗ Incorrect
Local config (inside a repository) overrides global and system configs.
Describe the structure of a
.gitconfig file and how to set user information.Think about how you organize settings in groups and assign values.
You got /4 concepts.
Explain the difference between system, global, and local
.gitconfig files and when each is used.Consider who and what each config affects.
You got /4 concepts.