QA
Beginner LevelGit & GitHub

How do git config settings configure user.name, user.email, and core.editor?

❓ Interview Prompt: Explain Git configuration levels (system, global ~/.gitconfig, local .git/config), setting commit author credentials, and core defaults.

git config operates at three priority levels: --system (/etc/gitconfig), --global (~/.gitconfig), and --local (.git/config). Configuring user.name and user.email is mandatory so commits are attributed correctly on GitHub.

Code Implementation Example

bash
git config --global user.name "Alice Developer"
git config --global user.email "alice@company.com"
git config --global core.editor "code --wait"
git config --list --show-origin
💡Configuring global user credentials and editor settings in Git.
🎯 Interview Key Takeaway

Set global author credentials via git config --global user.name and user.email to ensure correct commit attribution on GitHub.

#git config#Configuration#Beginner
Back to all Git & GitHub Questions→

More Git & GitHub Interview Questions

Beginner LevelGit & GitHub

Compare git rebase versus git merge and explain how git bisect finds regressions.

Beginner LevelGit & GitHub

What is the difference between git init and git clone?

Beginner LevelGit & GitHub

What are the Three Trees in Git (Working Directory, Staging Area / Index, Commit History)?