0
0
Gitdevops~10 mins

Global vs local configuration in Git - Interactive Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the command to set your user name globally in Git.

Git
git config --global user.name [1]
Drag options to blanks, or click blank then click option'
A--local
B"Your Name"
Cuser.email
Dinit
Attempts:
3 left
💡 Hint
Common Mistakes
Using --local instead of --global
Forgetting quotes around the name
Using user.email instead of user.name
2fill in blank
medium

Complete the command to set your email only for the current Git repository.

Git
git config [1] user.email "you@example.com"
Drag options to blanks, or click blank then click option'
Astatus
B--global
C--local
Dinit
Attempts:
3 left
💡 Hint
Common Mistakes
Using --global instead of --local
Using unrelated commands like init or status
3fill in blank
hard

Fix the error in the command to check the global user name configuration.

Git
git config [1] user.name
Drag options to blanks, or click blank then click option'
A--global
Bset
C--local
Dget
Attempts:
3 left
💡 Hint
Common Mistakes
Using --local instead of --global
Using 'set' or 'get' which are not valid flags here
4fill in blank
hard

Fill both blanks to list all Git configurations with their scope.

Git
git config --[1] --[2]
Drag options to blanks, or click blank then click option'
Alist
Bglobal
Clocal
Dedit
Attempts:
3 left
💡 Hint
Common Mistakes
Mixing up local and global
Using --edit instead of --list
5fill in blank
hard

Fill all three blanks to set a local Git alias named 'co' for 'checkout'.

Git
git config [1] alias.[2] [3]
Drag options to blanks, or click blank then click option'
A--local
Bco
Ccheckout
D--global
Attempts:
3 left
💡 Hint
Common Mistakes
Using --global instead of --local
Swapping alias name and command
Forgetting to use alias. prefix