Skip to content

Commit 2f48c3c

Browse files
authored
Merge pull request #4 from boettiger-lab/docs/copilot-branch-workflow
docs: add branch protection / PR workflow to agent instructions
2 parents ac7b7b4 + b5b6606 commit 2f48c3c

File tree

1 file changed

+30
-1
lines changed

1 file changed

+30
-1
lines changed

copilot-instructions.md

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,40 @@ Map-based application for exploring California's protected lands. Interactive Ma
2525
- `config.json` — Generated at deploy time by k8s (LLM models + API keys from secrets)
2626
- Both are merged by `main.js` at startup; runtime config overrides static config
2727

28+
## Git workflow — branch protection
29+
30+
The `main` branch is protected: **direct pushes are rejected**. All changes must go through a pull request.
31+
32+
**Committing and pushing changes:**
33+
1. Make changes, then commit:
34+
```bash
35+
git add <files>
36+
git commit -m "<message>"
37+
```
38+
2. Create a feature branch and push:
39+
```bash
40+
git checkout -b <branch-name>
41+
git push -u origin <branch-name>
42+
```
43+
3. The push output includes a PR URL — open it to create the pull request:
44+
```
45+
remote: Create a pull request ... by visiting:
46+
remote: https://github.com/boettiger-lab/geo-agent/pull/new/<branch-name>
47+
```
48+
4. After the PR is merged, **always clean up**:
49+
```bash
50+
git checkout main
51+
git pull
52+
git branch -d <branch-name>
53+
```
54+
55+
> If the user confirms the PR has been merged and asks to "clean up" or "switch back to main", run all three cleanup commands together.
56+
2857
## Deployment
2958
Deployment is managed via Kubernetes. The application runs in an nginx container that clones the repo on startup.
3059

3160
**To deploy changes:**
32-
1. Commit and push changes to the `main` branch.
61+
1. Merge changes to `main` via PR (see above).
3362
2. Restart the deployment:
3463
```bash
3564
kubectl rollout restart deployment/ca-lands

0 commit comments

Comments
 (0)