Skip to content

Commit 97baaf3

Browse files
committed
clarify that av pr automatically pushes the branch
1 parent 4a117cb commit 97baaf3

File tree

2 files changed

+11
-6
lines changed

2 files changed

+11
-6
lines changed

av-cli/skills/av-cli/SKILL.md

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ cat "$(git rev-parse --git-common-dir)/av/av.db"
3333

3434
## Critical Rules
3535

36-
**NEVER use `git commit` or `git push` directly.** Always use `av commit` and `av sync --push=yes --prune=yes`. Using git directly skips restacking and breaks the stack.
36+
**NEVER use `git commit` or `git push` directly.** Always use `av commit` for commits and `av pr` (which pushes automatically) or `av sync --push=yes --prune=yes` for pushing. Using git directly skips restacking and breaks the stack.
3737

3838
**NEVER pass `--no-edit` to `av commit --amend`.** The flag doesn't exist — no-edit is already the default behavior. Just use `av commit --amend`.
3939

@@ -66,8 +66,8 @@ Many `av` commands default to interactive TUI prompts that agents cannot use. **
6666

6767
```bash
6868
av commit -A -m "message"
69-
av pr --title "Title" --body "Body"
70-
av sync --push=yes --prune=yes
69+
av pr --title "Title" --body "Body" # pushes the branch and creates/updates the PR
70+
# av sync is only needed later to rebase the stack or push changes across multiple branches
7171
```
7272

7373
## Understanding Stack Structure
@@ -178,8 +178,9 @@ Each layer gets its own focused PR. Reviewers with different expertise (DBA, bac
178178
**Common mistakes:**
179179

180180
- `git commit -m "message"` → use `av commit -m "message"` instead
181-
- `git push` → use `av sync --push=yes --prune=yes` instead
181+
- `git push` → use `av pr` when creating a PR (it pushes automatically); use `av sync --push=yes --prune=yes` to push changes and rebase across the stack
182182
- `av commit --amend --no-edit` → just `av commit --amend` (no-edit is the default, the flag doesn't exist)
183+
- `av sync` before/after `av pr` → unnecessary; `av pr` pushes on its own
183184

184185
### Pull Requests
185186

@@ -191,6 +192,8 @@ Each layer gets its own focused PR. Reviewers with different expertise (DBA, bac
191192
| `av pr --draft` | Create PR as draft |
192193
| `av pr --edit` | Edit existing PR title/body |
193194

195+
**`av pr` automatically pushes** the current branch to the remote before creating or updating the PR. No prior `av sync` or `git push` is needed.
196+
194197
**Note:** Always pass `--title` and `--body` flags explicitly to avoid interactive prompts.
195198

196199
### Synchronization
@@ -252,6 +255,8 @@ Once a repo is av-initialized, **use av for everything** - even single PRs. av w
252255
| Switch branches | `av switch <branch>` |
253256
| View diff against parent | `av diff` |
254257

258+
**`av pr` vs `av sync`:** `av pr` pushes the current branch and creates/updates its PR — no separate push step needed. `av sync` fetches, rebases, and pushes across the entire stack. Use `av sync` for stack-wide rebase/push or cleanup after merges.
259+
255260
## Important Behaviors
256261

257262
1. **Use av commands consistently** - they work for single PRs and stacks alike.

av-cli/skills/av-cli/examples.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -503,10 +503,10 @@ av pr --title "Add new feature" --body "This PR adds X, Y, and Z"
503503
# Sync without confirmation prompts
504504
av sync --push=yes --prune=yes
505505

506-
# Full automated workflow: commit, PR, sync
506+
# Full automated workflow: commit and create PR (av pr pushes automatically)
507507
av commit -A -m "Add feature"
508508
av pr --title "Add feature" --body "Implementation details"
509-
av sync --push=yes --prune=yes
509+
# Use av sync later to rebase or push changes across the stack
510510

511511
# Adopt a branch non-interactively (avoid bare `av adopt` which opens a picker)
512512
av switch some-branch

0 commit comments

Comments
 (0)