Which Git configuration level applies settings only to the current repository?
Think about where you want the settings to take effect: just one project or all projects on your computer.
Local configuration applies only to the current repository. Global applies to the user across all repositories, and system applies to all users on the machine.
What is the output of the command git config --list --local when run inside a repository with a user.email set locally?
Local config overrides global and system for that repository.
The --local flag shows only settings from the local repository config, so it outputs the locally set user.email.
You want to set your Git user name for all repositories on your computer. Which command should you run?
Think about which config level applies to all repositories for your user.
The --global option sets the user name for all repositories for the current user. --local affects only the current repo, and --system affects all users on the machine.
You set your email globally with git config --global user.email "global@example.com", but commits in one repository still use a different email. What is the most likely reason?
Remember the order of precedence for Git config levels.
Local configuration has higher priority than global. If a local user.email is set, it overrides the global setting for that repository.
Which Git configuration level should you use to set a proxy for all users on a shared machine?
Think about settings that affect all users on the machine.
System configuration applies to all users and repositories on the machine, making it suitable for machine-wide settings like a proxy.