Bird
0
0

Which Git command shows the current global default branch name setting?

easy📝 Conceptual Q2 of 15
Git - Configuration and Aliases
Which Git command shows the current global default branch name setting?
Agit show init.defaultBranch
Bgit config --global init.defaultBranch
Cgit default-branch --global
Dgit branch --show-default
Step-by-Step Solution
Solution:
  1. Step 1: Identify the correct config command

    The command git config --global init.defaultBranch queries the global Git configuration for the default branch name.
  2. Step 2: Eliminate invalid commands

    Other options are not valid Git commands or do not show the default branch setting.
  3. Final Answer:

    git config --global init.defaultBranch -> Option B
  4. Quick Check:

    Show default branch config = git config --global init.defaultBranch [OK]
Quick Trick: Use git config --global init.defaultBranch to check default branch [OK]
Common Mistakes:
  • Using non-existent commands like git branch --show-default
  • Confusing branch commands with config commands
  • Trying git show for config values

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Git Quizzes