diff --git a/docs/git-workflow.md b/docs/git-workflow.md index 929cbc6..f3e84ee 100644 --- a/docs/git-workflow.md +++ b/docs/git-workflow.md @@ -2,7 +2,7 @@ Git Workflow and Branch Protection ================================== Goal -- Keep `master` protected; changes land via pull requests with review and passing checks. +- `master` is currently unprotected; contributors can push directly. Prefer feature branches + PRs so changes stay reviewable and CI-visible. Remotes - Forgejo repo: `ssh://git@git.halla-aho.net:2223/thalla/lomavuokraus.git` @@ -31,7 +31,7 @@ Daily flow ``` 5) Open a PR targeting `master` in Forgejo. 6) Get review + approvals; ensure CI passes. -7) Merge via the PR; master stays protected. +7) Merge via the PR; direct pushes work but are discouraged. 8) After merge, sync local master: ``` git checkout master @@ -40,11 +40,10 @@ Daily flow ``` Branch protection (set in Forgejo UI) -- Settings → Branches → Protect `master`. -- Enable: +- Currently disabled on `master`. To re-enable: + - Settings → Branches → Protect `master`. - Prevent direct pushes (except admins if desired). - - Require pull requests. - - Require at least 1 approval. + - Require pull requests and at least 1 approval. - Restrict who can push (admins/maintainers). - Optionally dismiss stale approvals and require status checks (CI). @@ -62,7 +61,7 @@ Recommended local config Common troubleshooting - Divergent branches on pull: set pull strategy (see above) and rerun `git pull --rebase` or `git pull`. - “Remote not found”: add `origin` remote (see Remotes). -- Push rejected (protected branch): push to a feature branch and open a PR. +- Push rejected (if protection is re-enabled): push to a feature branch and open a PR. - Conflicts during pull/rebase: ``` git status # see conflicted files