Bird
0
0

Which of the following commands correctly sets the user email only for the current Git project?

easy📝 Syntax Q12 of 15
Git - Configuration and Aliases
Which of the following commands correctly sets the user email only for the current Git project?
Agit config --global user.email "user@example.com"
Bgit config --system user.email "user@example.com"
Cgit config user.email "user@example.com"
Dgit set user.email "user@example.com"
Step-by-Step Solution
Solution:
  1. Step 1: Identify the correct command for local config

    By default, git config without --global or --system sets local config for the current project.
  2. Step 2: Check command syntax

    git config --local is valid but optional; git config user.email "user@example.com" is the simplest correct form.
  3. Final Answer:

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

    Local config uses git config without --global [OK]
Quick Trick: Use git config without --global for local settings [OK]
Common Mistakes:
  • Using --global when wanting local config
  • Using invalid command like git set
  • Assuming --local is mandatory

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Git Quizzes