Bird
0
0

Which command sets the Git user email only for the repository you are currently working in?

easy📝 Syntax Q3 of 15
Git - Configuration and Aliases
Which command sets the Git user email only for the repository you are currently working in?
Agit config --system user.email "user@example.com"
Bgit config --global user.email "user@example.com"
Cgit config --local user.email "user@example.com"
Dgit config user.email "user@example.com" --global
Step-by-Step Solution
Solution:
  1. Step 1: Identify local config flag

    The --local flag sets configuration only for the current repository.
  2. Step 2: Check other options

    --global affects all repos for the user, --system affects all users, and git config user.email "user@example.com" --global is invalid syntax.
  3. Final Answer:

    git config --local user.email "user@example.com" -> Option C
  4. Quick Check:

    Local flag limits config to current repo [OK]
Quick Trick: Use --local to set config only in current repo [OK]
Common Mistakes:
  • Using --global when local config is needed
  • Confusing command syntax order
  • Assuming no flag means local config

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Git Quizzes