Bird
0
0

Which of the following is the correct command to set Vim as the default editor for Git globally?

easy📝 Configuration Q12 of 15
Git - Configuration and Aliases
Which of the following is the correct command to set Vim as the default editor for Git globally?
Agit config --global core.editor nano
Bgit config --global core.editor vim
Cgit set core.editor vim
Dgit config core.editor --global vim
Step-by-Step Solution
Solution:
  1. Step 1: Recall the correct syntax for setting Git config globally

    The correct command uses git config --global core.editor <editor>.
  2. Step 2: Identify the correct placement of options and editor name

    git config --global core.editor vim correctly places --global before the key and sets the editor to vim.
  3. Final Answer:

    git config --global core.editor vim -> Option B
  4. Quick Check:

    Correct syntax: git config --global core.editor editor [OK]
Quick Trick: Use 'git config --global core.editor editorname' [OK]
Common Mistakes:
  • Swapping order of --global and key
  • Using 'git set' instead of 'git config'
  • Placing --global after the key

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Git Quizzes