Git & GitHub
Beginner
Git & GitHub for QAs Cheat Sheet
Essential Git commands and GitHub workflows every QA engineer needs. Branching, PRs, and CI.
Git & GitHub for QAs
Daily Commands
git status # What changed?
git add . # Stage everything
git commit -m "Add login tests" # Commit with message
git push # Push to remote
git pull # Get latest changes
Branching
git checkout -b feature/login-tests # Create & switch to branch
git checkout main # Switch to main
git merge feature/login-tests # Merge branch
git branch -d feature/login-tests # Delete branch
GitHub Workflow for QAs
git checkout -b test/add-checkout-tests- Write your tests
git add . && git commit -m "Add checkout flow tests"git push -u origin test/add-checkout-tests- Open Pull Request on GitHub
- Request review → CI runs tests → Merge
Useful Commands
git log --oneline -10 # Recent commits
git diff # See unstaged changes
git stash # Temporarily save changes
git stash pop # Restore stashed changes
git blame file.py # Who changed each line?
git bisect start # Find which commit broke tests
.gitignore for Test Projects
__pycache__/
node_modules/
.env
test-results/
screenshots/
allure-results/
GitHub Actions for Tests
name: Tests
on: [push, pull_request]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: pip install -r requirements.txt
- run: pytest tests/