What does the git config --list command show?

What does the git config --list command show?

a) Displays all configuration settings
b) Shows the commit history
c) Lists all local branches
d) Displays the differences between commits

Answer:

a) Displays all configuration settings

Explanation:

The git config --list command displays all Git configuration settings for the repository, including user information, aliases, remote repository URLs, and other settings defined in the Git configuration files.

For example, running git config --list will show settings like your user email, the default branch name, and any custom aliases you’ve set up.

This command is useful for reviewing and troubleshooting Git configuration issues.

Reference:

Top 100 Git and GitHub MCQ Questions and Answers

Scroll to Top