📦 deps(thirdparty): update snapshots
This commit is contained in:
@@ -0,0 +1,53 @@
|
||||
# Stack Patterns
|
||||
|
||||
Detailed patterns for GitButler stacked branches.
|
||||
|
||||
## Feature Dependency Stack
|
||||
|
||||
Build features that depend on each other in sequence.
|
||||
|
||||
```bash
|
||||
# Auth foundation
|
||||
but branch new auth-core
|
||||
but commit auth-core -m "feat: add authentication core"
|
||||
|
||||
# OAuth layer depends on auth core
|
||||
but branch new auth-oauth --anchor auth-core
|
||||
but commit auth-oauth -m "feat: add OAuth integration"
|
||||
|
||||
# Social login depends on OAuth
|
||||
but branch new auth-social --anchor auth-oauth
|
||||
but commit auth-social -m "feat: add social login"
|
||||
```
|
||||
|
||||
## Refactoring Stack
|
||||
|
||||
Break large refactors into reviewable phases.
|
||||
|
||||
```bash
|
||||
# Extract utilities
|
||||
but branch new refactor-extract-utils
|
||||
but commit refactor-extract-utils -m "refactor: extract common utilities"
|
||||
|
||||
# Update consumers
|
||||
but branch new refactor-use-utils --anchor refactor-extract-utils
|
||||
but commit refactor-use-utils -m "refactor: use extracted utilities"
|
||||
|
||||
# Clean up
|
||||
but branch new refactor-cleanup --anchor refactor-use-utils
|
||||
but commit refactor-cleanup -m "refactor: remove deprecated code"
|
||||
```
|
||||
|
||||
## Deep Stack (5+ Levels)
|
||||
|
||||
For complex features requiring many dependent phases.
|
||||
|
||||
```bash
|
||||
but branch new db-schema
|
||||
but branch new data-access --anchor db-schema
|
||||
but branch new business-logic --anchor data-access
|
||||
but branch new api-endpoints --anchor business-logic
|
||||
but branch new frontend-integration --anchor api-endpoints
|
||||
```
|
||||
|
||||
**Caution:** Deep stacks increase merge complexity. Prefer 2-3 levels when possible.
|
||||
@@ -0,0 +1,70 @@
|
||||
# Stack Reorganization
|
||||
|
||||
Advanced techniques for reorganizing GitButler stacks.
|
||||
|
||||
## Post-Hoc Stack Organization
|
||||
|
||||
**Problem:** Created branches independently, now want to stack them.
|
||||
|
||||
**Solution:** Recreate with correct anchors:
|
||||
|
||||
```bash
|
||||
# Current: three independent branches
|
||||
# feature-a, feature-b, feature-c
|
||||
|
||||
# Stack feature-b on feature-a
|
||||
but branch new feature-b-stacked --anchor feature-a
|
||||
commit_sha=$(but show feature-b --json | jq -r '.commits[0].id')
|
||||
but rub $commit_sha feature-b-stacked
|
||||
but branch delete feature-b --force
|
||||
|
||||
# Stack feature-c on feature-b-stacked
|
||||
but branch new feature-c-stacked --anchor feature-b-stacked
|
||||
commit_sha=$(but show feature-c --json | jq -r '.commits[0].id')
|
||||
but rub $commit_sha feature-c-stacked
|
||||
but branch delete feature-c --force
|
||||
```
|
||||
|
||||
## Squashing Within Stack
|
||||
|
||||
Combine commits within the same stack level.
|
||||
|
||||
```bash
|
||||
# Squash all commits in a branch
|
||||
but squash my-branch
|
||||
|
||||
# Or squash specific commits
|
||||
but squash <newer-commit> <older-commit>
|
||||
```
|
||||
|
||||
## Moving Commits Between Stack Levels
|
||||
|
||||
Relocate a commit to the correct branch in the stack.
|
||||
|
||||
```bash
|
||||
# Use commit ID from `but status` or `but show`
|
||||
but rub <commit-id> correct-branch
|
||||
```
|
||||
|
||||
## Splitting a Branch
|
||||
|
||||
Extract part of a branch into a new stack level.
|
||||
|
||||
```bash
|
||||
# Original has multiple features
|
||||
but branch new second-feature --anchor original-branch
|
||||
# Use commit ID from `but show original-branch`
|
||||
but rub <commit-id> second-feature
|
||||
```
|
||||
|
||||
## Recovery
|
||||
|
||||
Recreate a branch with correct anchor when the original was created wrong.
|
||||
|
||||
```bash
|
||||
# Recreate branch with correct anchor
|
||||
but branch new child-stacked --anchor parent
|
||||
commit_sha=$(but show child --json | jq -r '.commits[0].id')
|
||||
but rub $commit_sha child-stacked
|
||||
but branch delete child --force
|
||||
```
|
||||
Reference in New Issue
Block a user