Bird
0
0

You want to configure Git to use Emacs as your editor, but only for a single repository, not globally. Which command correctly sets this?

hard📝 Best Practice Q15 of 15
Git - Configuration and Aliases
You want to configure Git to use Emacs as your editor, but only for a single repository, not globally. Which command correctly sets this?
Agit config local core.editor emacs
Bgit config --global core.editor emacs
Cgit config core.editor emacs
Dgit config --system core.editor emacs
Step-by-Step Solution
Solution:
  1. Step 1: Understand Git config scopes

    Global config applies to all repos, local config applies to current repo only, system config applies to all users on the machine.
  2. Step 2: Identify the correct command for local repo setting

    Using git config core.editor emacs without --global or --system sets the editor only for the current repository.
  3. Final Answer:

    git config core.editor emacs -> Option C
  4. Quick Check:

    Local config = no --global or --system [OK]
Quick Trick: Omit --global to set editor for current repo only [OK]
Common Mistakes:
  • Using --global sets editor for all repos
  • Using --system requires admin rights
  • Using 'local' without the '--' flag

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Git Quizzes