Which command sets your Git email globally?

Dive into the Architect Journey – Development Lifecycle and Deployment Exam. Prep with tailored flashcards, explore multiple choice questions with detailed explanations, and enhance your readiness for the test!

Multiple Choice

Which command sets your Git email globally?

Explanation:
Setting your Git email globally means configuring it once per user so every repository you work with on that machine uses the same email for commits unless you override it locally. To do this, you use the global scope and the correct key for the email: git config --global user.email "you@email.com". This stores the value in your home directory’s .gitconfig, applying across all repos. Other approaches don’t achieve the same result: using a non-existent --email flag won’t work because Git configurations use the key name, not a separate flag; omitting the scope sets only the repository-specific (local) config, so it won’t apply universally; and using --system would change the system-wide config (affecting all users) and usually requires elevated permissions, which isn’t the intended per-user global setting.

Setting your Git email globally means configuring it once per user so every repository you work with on that machine uses the same email for commits unless you override it locally. To do this, you use the global scope and the correct key for the email: git config --global user.email "you@email.com". This stores the value in your home directory’s .gitconfig, applying across all repos.

Other approaches don’t achieve the same result: using a non-existent --email flag won’t work because Git configurations use the key name, not a separate flag; omitting the scope sets only the repository-specific (local) config, so it won’t apply universally; and using --system would change the system-wide config (affecting all users) and usually requires elevated permissions, which isn’t the intended per-user global setting.

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy