What is the main benefit of having a .git/config file in your project directory?
Think about how configuration files help customize behavior for each project.
A .git/config file in a project folder lets you set Git options that apply only to that project, improving workflow by tailoring Git behavior without changing global settings.
What will be the output of git config --get user.email after running git config --local user.email "dev@example.com" inside a Git repository?
git config --local user.email "dev@example.com" git config --get user.email
Local config overrides global config inside a repository.
Setting user.email with --local changes it only for the current repository. The git config --get command then shows this local value.
Which of the following best explains how a .gitattributes file improves team workflow?
Think about how different computers handle text files differently.
.gitattributes helps avoid problems by telling Git how to treat files, like normalizing line endings, so everyone on the team sees the same content and avoids merge conflicts.
You added a pattern to your .gitignore file, but Git still tracks those files. What is the most likely reason?
Think about when Git starts tracking files.
Git only ignores untracked files matching .gitignore. If files were already added to Git, they remain tracked until removed explicitly.
How do Git commit hooks configured in .git/hooks improve workflow reliability?
Think about how automation can prevent mistakes before saving work.
Commit hooks run scripts before commits to ensure code meets standards or tests pass, reducing errors and improving team workflow.