diff --git a/.claude/docs/WORKFLOWS.md b/.claude/docs/WORKFLOWS.md index 4e9dfb78599ee..9fdd2ff5971e7 100644 --- a/.claude/docs/WORKFLOWS.md +++ b/.claude/docs/WORKFLOWS.md @@ -121,6 +121,20 @@ - Use `testutil.WaitLong` for timeouts in tests - Always use `t.Parallel()` in tests +## Git Workflow + +### Working on PR branches + +When working on an existing PR branch: + +```sh +git fetch origin +git checkout branch-name +git pull origin branch-name +``` + +Then make your changes and push normally. Don't use `git push --force` unless the user specifically asks for it. + ## Commit Style - Follow [Conventional Commits 1.0.0](https://www.conventionalcommits.org/en/v1.0.0/) diff --git a/AGENTS.md b/AGENTS.md index 2c055551ed4d6..9cdb31a125cac 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -103,6 +103,18 @@ app, err := api.Database.GetOAuth2ProviderAppByClientID(ctx, clientID) ### Full workflows available in imported WORKFLOWS.md +### Git Workflow + +When working on existing PRs, check out the branch first: + +```sh +git fetch origin +git checkout branch-name +git pull origin branch-name +``` + +Don't use `git push --force` unless explicitly requested. + ### New Feature Checklist - [ ] Run `git pull` to ensure latest code