From cbbcaace22949c9def91d3030d47562bd74d1cb5 Mon Sep 17 00:00:00 2001 From: Unchained Date: Fri, 3 Apr 2026 21:03:04 +0200 Subject: [PATCH] docs: add git workflow guidelines --- CONTRIBUTING.md | 51 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 CONTRIBUTING.md diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..a42f9ab --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,51 @@ +# Git Workflow + +## Branch Strategy + +``` +feature/* → dev → master +``` + +| Branch | Purpose | +|--------|---------| +| `master` | Production only | +| `dev` | Integration/testing | +| `feature/*` | All new work | + +## Rules + +1. **All work starts on a feature branch** - Never commit to dev/master directly +2. **Commit early and often** - Working code = committed code +3. **No uncommitted files** - Working directory must be clean before switching branches +4. **Always flow forward** - feature → dev → master, never skip +5. **Reset feature branches after merge** - Keep them synchronized with master + +## Workflow + +```bash +# Start work +git checkout -b feature/name + +# Commit working code immediately +git add . +git commit -m "feat: description" + +# Test on dev +git checkout dev +git merge feature/name + +# Deploy to production +git checkout master +git merge dev + +# Clean up +git checkout feature/name +git reset --hard master +``` + +## Pre-Flight Check + +Before switching branches: +```bash +git status # Must be clean +```