0
0
Gitdevops~10 mins

Default branch name configuration in Git - Interactive Code Practice

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

Complete the command to set the default branch name globally to 'main'.

Git
git config --global init.[1] main
Drag options to blanks, or click blank then click option'
AdefaultBranch
Bbranch
Cdefault-branch
DinitBranch
Attempts:
3 left
💡 Hint
Common Mistakes
Using incorrect config keys like 'branch' or 'initBranch'.
2fill in blank
medium

Complete the command to check the current global default branch name configuration.

Git
git config --global --get init.[1]
Drag options to blanks, or click blank then click option'
AdefaultBranch
Bhead
Cdefault
Dmain
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'default' or 'head' instead of 'defaultBranch'.
3fill in blank
hard

Fix the error in the command to set the default branch name to 'main' globally.

Git
git config --global init.[1] main
Drag options to blanks, or click blank then click option'
Abranch
Bdefault-branch
CdefaultBranch
DinitBranch
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'branch' or hyphenated keys instead of 'defaultBranch'.
4fill in blank
hard

Fill both blanks to set the default branch name to 'main' only for the current repository.

Git
git config [1] init.[2] main
Drag options to blanks, or click blank then click option'
A--local
B--global
Cbranch
DdefaultBranch
Attempts:
3 left
💡 Hint
Common Mistakes
Using --global instead of --local.
Using wrong config keys.
5fill in blank
hard

Fill all three blanks to unset the default branch name configuration globally.

Git
git config [1] --unset init.[2]
Drag options to blanks, or click blank then click option'
A--local
B--global
Cbranch
DdefaultBranch
Attempts:
3 left
💡 Hint
Common Mistakes
Using --local instead of --global.
Using wrong keys.