You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Stage all changes, commit, and use an explicit branch name
130
-
gh stack add -am"Add tests" test-layer
130
+
gh stack add -Am"Add tests" test-layer
131
131
132
132
# Stage only tracked files, commit, and use an explicit branch name
133
133
gh stack add -um "Update docs" docs-layer
@@ -391,9 +391,9 @@ gh stack sync
391
391
392
392
## Abbreviated workflow
393
393
394
-
If you want to minimize keystrokes, use a branch prefix and the `-am` flags to fold staging, committing, and branch creation into a single command. Branch names are auto-generated from your commit messages.
394
+
If you want to minimize keystrokes, use a branch prefix and the `-Am` flags to fold staging, committing, and branch creation into a single command. Branch names are auto-generated from your commit messages.
395
395
396
-
When a branch has no commits yet (e.g., right after `init`), `add -am` stages and commits directly on that branch instead of creating a new one. Once a branch has commits, `add -am` creates a new branch, checks it out, and commits there.
396
+
When a branch has no commits yet (e.g., right after `init`), `add -Am` stages and commits directly on that branch instead of creating a new one. Once a branch has commits, `add -Am` creates a new branch, checks it out, and commits there.
397
397
398
398
```sh
399
399
# 1. Start a stack with a prefix
@@ -404,26 +404,26 @@ gh stack init -p feat
404
404
# ... write code ...
405
405
406
406
# 3. Stage and commit on the current branch
407
-
gh stack add -am"Auth middleware"
407
+
gh stack add -Am"Auth middleware"
408
408
# → feat/01 has no commits yet, so the commit lands here
409
409
# (no new branch is created)
410
410
411
411
# 4. Write code for the next layer
412
412
# ... write code ...
413
413
414
414
# 5. Create the next branch and commit
415
-
gh stack add -am"API routes"
415
+
gh stack add -Am"API routes"
416
416
# → feat/01 already has commits, so a new branch feat/02 is
417
417
# created, checked out, and the commit lands there
418
418
419
419
# 6. Keep going
420
420
# ... write code ...
421
421
422
-
gh stack add -am"Frontend components"
422
+
gh stack add -Am"Frontend components"
423
423
# → feat/02 already has commits, creates feat/03 and commits there
424
424
425
425
# 7. Push everything and create PRs
426
426
gh stack push
427
427
```
428
428
429
-
Compared to the typical workflow, there's no need to name branches, run `git add`, or run `git commit` separately. Each `gh stack add -am "..."` does it all.
429
+
Compared to the typical workflow, there's no need to name branches, run `git add`, or run `git commit` separately. Each `gh stack add -Am "..."` does it all.
0 commit comments