Files
archicratie-edition/docs/gitea-pr-main-protege.md
Archicratia cab9e9cf2d
All checks were successful
CI / build-and-anchors (push) Successful in 1m27s
SMOKE / smoke (push) Successful in 16s
docs: add auth stack + main protected PR workflow
2026-02-13 19:17:35 +01:00

1.3 KiB
Raw Blame History

Workflow Git/Gitea — main protégé (PR only)

Objectif

Éviter toute casse de main : on travaille toujours via branche + Pull Request.

1) Démarrer propre (local)

en bash :

git fetch origin --prune git checkout main git reset --hard origin/main git clean -fd

2) Créer une branche

git checkout -b fix/ma-modif

3) Modifier, tester, commit

npm test git add -A git commit -m "Mon changement"

4) Push (création branche distante)

git push -u origin fix/ma-modif

5) Créer la Pull Request (UI Gitea)

Gitea → repository → Pull Requests → New Pull Request

base : main
compare : fix/ma-modif

Si “je ne vois pas de PR”

Vérifie dabord quil y a un diff réel :

git log --oneline origin/main..HEAD

Si la commande ne sort rien : ta branche ne contient aucun commit différent → PR inutile/invisible.

6) Conflits

Ne merge pas en local vers main (push refusé si main protégé). On met à jour la branche de PR :

Option A (simple) : merge main dans la branche

git fetch origin git merge origin/main

résoudre conflits

npm test git push

Option B (plus propre) : rebase

git fetch origin git rebase origin/main

résoudre conflits, puis:

npm test git push --force-with-lease

7) Merge

Toujours depuis lUI de la Pull Request (ou via un mainteneur).