Interview Q&A / Git & GitHub

INTERVIEW Q&A · 97 QUESTIONS

Git & GitHub interview questions

Branching, merge vs rebase, resolving conflicts and pull requests, the way teams actually work.

  1. 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
  2. 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