QuestionQ51

VerifiedIntroduction to DevSecOps

Walter O’Brien recently joined as a junior DevSecOps engineer at an IT company based in Lansing, Michigan. His organization develops robotic process automation software for clients located around the world. Walter's team leader asked him to configure the username and user email for git in VS Code. To do this, he opened the Visual Studio Code IDE, clicked on the Terminal tab, and selected New terminal.

Which command should Walter run in the terminal to configure the username and user email for git in VS Code?

Explanation

Git stores user identity settings using the config keys user.name and user.email, and the standard commands to set them globally are git config --global user.name "<name>" and git config --global user.email "<email>". These settings can be configured from any terminal, including the integrated terminal in VS Code, since Git configuration is managed independently of the editor. The correct option uses the proper dot-notation key names (user.name and user.email) rather than incorrect variants using hyphens or underscores, matching Git's actual configuration key format as documented by Git and common Git tutorials.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!