Interview Q&A / Git & GitHub
Git & GitHub interview questions
Branching, merge vs rebase, resolving conflicts and pull requests, the way teams actually work.
Prefer rapid revision? Practise Git & GitHub short interview answers →
- How do the patterns in a .gitignore file work?
Each line is a pattern. * matches any characters except a slash, a trailing slash matches directories, ** matches nested directories, ! negates a pattern, and
BeginnerQuick answer1 min read - What kinds of files should you put in .gitignore?
Generated, secret or machine-specific files: dependencies like node_modules, build output, logs, .env files, and editor or OS clutter. Source code and configuration the team needs must stay tracked.
BeginnerQuick answer1 min read