0
0
Gitdevops~5 mins

Git configuration (user.name, user.email) - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
Recall & Review
beginner
What is the purpose of git config user.name?
It sets the name that will appear as the author of your commits in Git.
Click to reveal answer
beginner
What does git config user.email do?
It sets the email address that will be associated with your commits in Git.
Click to reveal answer
beginner
How do you set your Git username globally for all repositories?
Use the command git config --global user.name "Your Name".
Click to reveal answer
beginner
How can you check your current Git user name and email?
Run git config user.name and git config user.email to see the current settings.
Click to reveal answer
intermediate
What is the difference between setting Git config with and without --global?
With --global, the setting applies to all repositories for your user. Without it, the setting applies only to the current repository.
Click to reveal answer
Which command sets your Git email globally?
Agit email set --global "you@example.com"
Bgit set user.email "you@example.com"
Cgit config user.email --global "you@example.com"
Dgit config --global user.email "you@example.com"
What happens if you set user.name without --global?
AIt sets the username for all repositories.
BIt sets the username only for the current repository.
CIt deletes the global username.
DIt sets the username for all users on the computer.
How do you view your current Git username?
Agit config user.name
Bgit show user.name
Cgit get user.name
Dgit user.name
Why is it important to set user.email in Git?
AIt sets the repository URL.
BIt controls repository access.
CIt identifies the author of commits.
DIt changes the branch name.
Which file stores the global Git configuration?
A~/.gitconfig
B.git/config
C/etc/gitconfig
Dconfig/global.git
Explain how to set your Git username and email globally and why it matters.
Think about how Git tracks who makes changes.
You got /4 concepts.
    Describe the difference between global and local Git configuration for user.name and user.email.
    Consider scope and command syntax.
    You got /4 concepts.