Skip to main content

Git Branch Stacking Utility

Project description

Panqake: Stack Git Branches Without the Headache

Panqake is a CLI tool that makes managing dependent pull requests significantly easier by automating the entire git-stacking workflow. Stop dealing with painful rebases and focus on your code instead.

What Problems Panqake Solves

  • Reviews no longer block progress on dependent work
  • Simplify complex workflows with a single command for common operations
  • Eliminate manual rebasing when working with dependent branches
  • Automate PR management for each branch in your stack

Quick Installation

uv tool install panqake

Optional dependency:

  • gh: GitHub CLI (needed only for PR creation/management)

Most-Used Commands

Command Purpose What It Does
pq new feature-name Create branches Creates a new branch based on your current branch
pq modify Commit changes Interactively select files to stage and commit/amend
pq update Propagate changes Rebases all child branches and updates their PRs
pq submit Submit changes Updates the PR with current branch changes
pq sync Sync branches Fetches latest changes from the remote main branch, updates local child branches, and optionally deletes merged branches
pq merge Complete workflow Merges PR and updates all dependent branches
pq list or pq ls View branch structure Lists all branches in the stack with their relationships
pq switch or pq co Navigate branches Switches to another branch in the stack
pq up Navigate to parent Moves up from current branch to its parent
pq down Navigate to child Moves down from current branch to a child branch

Real-World Workflow Example

Here's how to build a stack of dependent features:

# Start from main
git checkout main

# Create your base feature branch
pq new auth-backend
# Make changes, commit them
pq modify -m "Implement JWT authentication"

# Create a dependent branch for frontend work
pq new auth-frontend
# Make changes, commit them
git add .
pq modify -m "Add login form UI"

# Oops! Need to fix something in the backend branch
pq switch auth-backend
# Make your backend fixes

# Commit the fixes and automatically update child branches
pq modify -m "Fix token validation"

# Sync with remote main and update stack
pq sync

# Update any remaining child branches if needed
pq update

# Create PRs for your entire stack with a single command
pq pr

# When the first PR is approved, merge it and update the stack
pq merge auth-backend

Advanced Features

Sync with Remote Main Branch

Keep your branch stack up to date with remote changes:

# Sync with remote main and update stack
pq sync

Track, Untrack, and Rename Git Branches

Add branches created outside panqake to your stack:

pq track feature-branch

# You can use the list alias to see your branch structure
pq ls

# Use the switch alias to move between branches
pq co auth-frontend

Remove a branch from the panqake stack without deleting the git branch:

pq untrack feature-branch

Rename a branch while preserving its stack relationships:

# Rename the current branch
pq rename new-branch-name

# Rename a specific branch
pq rename old-branch-name new-branch-name

Flexible Commit Creation

# Amend existing Commit
pq modify

# Force creating a new commit instead of amending
pq modify --no-amend

# Or explicitly
pq modify --commit -m "New feature implementation"

Delete a Branch While Preserving the Stack

pq delete feature-old

Quick Branch Navigation

Navigate up and down the branch stack directly:

# Move up to the parent branch
pq up

# Move down to a child branch
# If there are multiple children, you'll be prompted to select one
pq down

Why Choose Panqake

  • Designed for real workflows: Stack PRs without effort
  • Reduces context switching by making branch navigation seamless
  • Single command operations: Complex git operations condensed to simple commands
  • GitHub integration: Seamlessly works with GitHub PRs

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

panqake-0.14.0.tar.gz (29.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

panqake-0.14.0-py3-none-any.whl (42.1 kB view details)

Uploaded Python 3

File details

Details for the file panqake-0.14.0.tar.gz.

File metadata

  • Download URL: panqake-0.14.0.tar.gz
  • Upload date:
  • Size: 29.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.7.6

File hashes

Hashes for panqake-0.14.0.tar.gz
Algorithm Hash digest
SHA256 5b584f680ae3559ce0f84a9e4c41d223da045f43cfad7528b30c720eb7c9cf5e
MD5 17d8dc1afe3ba5567812cc7d94d5541b
BLAKE2b-256 521b6c6a696e810c66f4979d4a1934e3ff4c164934a7dfbf193112fbf54d0a9e

See more details on using hashes here.

File details

Details for the file panqake-0.14.0-py3-none-any.whl.

File metadata

  • Download URL: panqake-0.14.0-py3-none-any.whl
  • Upload date:
  • Size: 42.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.7.6

File hashes

Hashes for panqake-0.14.0-py3-none-any.whl
Algorithm Hash digest
SHA256 35796fa40fa38188201485b6f0838d8a5ae399314fdd311889e75195cea7d4c1
MD5 abc7bd39364f68e0b1b74a76c4f8e604
BLAKE2b-256 fd04857e96bd3b7188515dd8bf6ca42960a9e63d21f8f5ad5ffe672c61853ced

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page