Challenge - 5 Problems
Git Config Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
💻 Command Output
intermediate1:30remaining
Check current Git user name configuration
What is the output of the command
git config --global user.name if the global user name is set to "Alice Dev"?Git
git config --global user.nameAttempts:
2 left
💡 Hint
This command shows the global user name set in Git configuration.
✗ Incorrect
The command
git config --global user.name outputs the global user name string exactly as set, here "Alice Dev".💻 Command Output
intermediate1:30remaining
Effect of missing user.email in Git commit
What error message appears if you try to commit in Git but the
user.email is not set anywhere in the configuration?Git
git commit -m "Test commit"
Attempts:
2 left
💡 Hint
Git needs an email to identify the author of commits.
✗ Incorrect
If user.email is not set, Git tries to guess but fails and shows a fatal error about unable to auto-detect email address.
❓ Configuration
advanced2:00remaining
Set local Git user name and email for a repository
Which commands correctly set the local Git user name to "Bob Builder" and email to "bob@build.com" only for the current repository?
Attempts:
2 left
💡 Hint
Local config is the default when no flag is given.
✗ Incorrect
Running
git config user.name without flags sets the value only for the current repository (local). The --global flag sets it globally, and --system sets system-wide.❓ Troubleshoot
advanced2:00remaining
Diagnose why Git commit uses wrong email
You set your global Git email to "alice@example.com" but commits in a specific repository show author email as "old@example.com". What is the most likely cause?
Attempts:
2 left
💡 Hint
Local config overrides global config in Git.
✗ Incorrect
Git uses the local repository config first if set. If user.email is set locally, it overrides the global setting.
✅ Best Practice
expert2:30remaining
Best practice for managing Git user identity across multiple projects
You work on personal and work projects on the same machine. What is the best way to manage your Git user.name and user.email to keep identities separate?
Attempts:
2 left
💡 Hint
Global config is default; local config overrides it per repo.
✗ Incorrect
Setting global config to personal info and overriding locally for work repos keeps identities clean and automatic.