Practice - 5 Tasks
Answer the questions below
1fill in blank
easyComplete the command to set your Git user name globally.
Git
git config --global user.name [1] Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Forgetting to use quotes around the user name.
Using user.email instead of user.name.
Omitting the --global flag.
✗ Incorrect
The correct command to set the user name globally is: git config --global user.name "John Doe". The user name must be a string in quotes.
2fill in blank
mediumComplete the command to set your Git email globally.
Git
git config --global user.email [1] Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using user.name instead of user.email.
Not using quotes around the email.
Using --local instead of --global.
✗ Incorrect
The correct command to set the user email globally is: git config --global user.email "john@example.com". The email must be a string in quotes.
3fill in blank
hardFix the error in the command to set the user name globally.
Git
git config --global user.name [1] Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using the email instead of the name.
Not using quotes around the name with spaces.
Using user.email instead of user.name.
✗ Incorrect
The user name must be a string in quotes. Without quotes, the command will fail if the name contains spaces.
4fill in blank
hardFill both blanks to list your Git configuration for user name and email.
Git
git config --get [1] && git config --get [2]
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using --global instead of the key names.
Using user.password which is not a valid config key.
Mixing up user.name and user.email.
✗ Incorrect
The commands git config --get user.name and git config --get user.email show the configured user name and email.
5fill in blank
hardFill all three blanks to set your Git user name and email locally, then verify the email.
Git
git config [1] user.name [2] && git config [1] user.email [3] && git config --get user.email
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using --global instead of --local for local config.
Not quoting the name or email.
Not verifying the email after setting.
✗ Incorrect
Use --local to set config for the current repo only. Provide the user name and email in quotes. Then verify with git config --get user.email.