Git Workflow - Alexapop/F5-team-project-GitSushi-restaurant-frontend GitHub Wiki
We work with a fork-based workflow: each of us has a personal fork (origin) that we keep in sync with the team repository (upstream).
%%{init: { 'gitGraph': { 'mainBranchName': 'dev' } } }%%
gitGraph
commit id: "git pull upstream dev"
branch feat/cart-management
commit id: "feat: add cart actions"
commit id: "feat: add cart summary"
commit id: "test: cover cart store"
checkout dev
merge feat/cart-management id: "merge into local dev"
commit id: "push origin dev + PR"
Initial setup (once)
git clone https://github.com/<github-user>/project-p5-digital-academy-team1-restaurant-frontend.git
cd project-p5-digital-academy-team1-restaurant-frontend
git remote add upstream https://github.com/FactoriaF5-Asturias/project-p5-digital-academy-team1-restaurant-frontend.git
git checkout dev
Working on a task
# 1. Update your local dev with the team's latest changes
git checkout dev
git pull upstream dev
# 2. Create a branch for the task
git checkout -b feat/short-description
# 3. Atomic commits: one file / one step at a time
git add src/components/CartSummary.vue
git commit -m "feat: add cart summary component"
# 4. Merge the branch into your local dev
git checkout dev
git pull upstream dev
git merge feat/short-description
# 5. Push the local dev to the personal fork
git push origin dev
- Open a Pull Request on GitHub: base
FactoriaF5-Asturias/...:dev← compare<github-user>/...:dev. We always double-check that the base branch isdev, notmain. GitHub Actions runs the tests automatically.
# 7. After the PR is merged
git checkout dev
git pull upstream dev
git push origin dev
git branch -d feat/short-description
Branch naming
| Prefix | Usage | Example |
|---|---|---|
feat/ |
New feature | feat/order-confirmation |
fix/ |
Bug fix | fix/product-image-path |
chore/ |
Configuration, tooling, design tokens | chore/apply-design-tokens |
Branch names are in English, lowercase and kebab-case.
Commit messages
Following Conventional Commits:
feat: add payment selector for home delivery
fix: clear persisted cart after confirming an order
test: cover offer consumption after order confirmation
chore: configure test coverage
Pull Requests
- Title: in English, describing the change.
- Description: what changed, why, and how to test it.
- At least one other member of the team reviews it before merging, and the CI checks must pass.
mainonly receives the final, reviewed version fromdev.