Ir al contenido principal
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

  1. git checkout -b test/add-checkout-tests
  2. Write your tests
  3. git add . && git commit -m "Add checkout flow tests"
  4. git push -u origin test/add-checkout-tests
  5. Open Pull Request on GitHub
  6. 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/
← All cheat sheets