Modern QA2026Hands-On Exercise — tiles
Log inJoin
57 / 57 · 17 Git & Version Control · Gitignore and Practical Tips← prev⊞ all☰ Read as one page

7.9Hands-On Exercise

  1. Review your project's .gitignore. Are test results, screenshots, and .env files properly ignored?
  2. Check if any test artifacts have been accidentally committed: git ls-files | grep -E "(test-results|coverage|screenshots)"
  3. Set up the Git aliases listed above and use git lg to explore your project's history
  4. Practice git stash to switch branches mid-work and return without losing changes
  5. Use git log -S to find when a specific test selector was introduced or changed
  6. Set up a pre-commit hook that prevents committing .only in test files

Interview Talking Point: "I use Git as a QA tool, not just a code storage tool. I use git bisect to binary-search for regression-introducing commits, saving hours of manual investigation. I write PR descriptions that include test evidence and verification steps. I understand branching strategies well enough to adapt my test execution plan -- in trunk-based development I ensure every commit is deployable, while in GitFlow I plan for testing at multiple integration points. I configure .gitignore to keep test artifacts out of the repository, and I use git hooks to prevent common mistakes like committing .only or .env files. I tag releases with test result metadata so we have a clear audit trail of what was verified for each release."