Modern QA2026Practical Workflow for QA Engineers — tiles
Log inJoin
16 / 57 · 17 Git & Version Control · Rebase vs Merge← prev⊞ allnext →☰ Read as one page

2.8Practical Workflow for QA Engineers

Here is the daily workflow that keeps your branches clean:

# 1. Start a new feature branch
git checkout main
git pull origin main
git checkout -b feature/add-checkout-tests

# 2. Work on your tests, making multiple commits
git add tests/checkout.spec.ts
git commit -m "WIP: add checkout happy path test"
# ... more work ...
git commit -m "add checkout error handling tests"
git commit -m "fix selector for payment button"

# 3. Before opening a PR, update with latest main
git fetch origin
git rebase origin/main

# 4. Clean up commits with interactive rebase
git rebase -i HEAD~3
# Squash "fix selector" into the relevant commit

# 5. Force-push to your feature branch (safe because it's your branch)
git push --force-with-lease origin feature/add-checkout-tests

# 6. Open PR. After approval, squash merge into main.

The --force-with-lease flag is safer than --force. It refuses to push if someone else has pushed to the branch since your last fetch, preventing you from accidentally overwriting their work.