Bird
0
0

You set your Git editor with git config core.editor vim but Git still opens nano. What could be wrong?

medium📝 Troubleshoot Q7 of 15
Git - Configuration and Aliases
You set your Git editor with git config core.editor vim but Git still opens nano. What could be wrong?
AGit does not support vim as editor
BVim is not installed on your system
CYou need to set the editor globally with --global flag
DYou must restart Git after setting editor
Step-by-Step Solution
Solution:
  1. Step 1: Understand config scope

    Setting core.editor without --global sets it only for the current repository.
  2. Step 2: Identify why nano opens instead

    If you run Git commands outside that repo, global config applies, which may default to nano.
  3. Final Answer:

    You need to set the editor globally with --global flag -> Option C
  4. Quick Check:

    Use --global to set editor for all repos [OK]
Quick Trick: Use --global to set editor for all projects [OK]
Common Mistakes:
  • Assuming vim is unsupported
  • Not checking if vim is installed
  • Thinking Git needs restart

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Git Quizzes