Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,8 @@ dgr pr list --view
dgr init # initialize dagger in the current directory
dgr branch <name> # create a tracked branch from the current branch
dgr branch <name> -p <parent> # create a tracked branch under a specific parent
dgr switch <branch> # switch directly to a local branch
dgr switch # choose a tracked branch from the interactive tree
dgr tree # show the full tracked branch tree
dgr tree --branch <branch> # show one branch and its descendants
dgr commit -m "message" # commit and restack tracked descendants if needed
Expand All @@ -117,6 +119,8 @@ dgr reparent <branch> -p <parent> # reparent a named tracked branch onto a new p
dgr orphan <branch> # stop tracking a branch but keep the local branch
```

When you run `dgr switch` without a branch name, dagger opens an inline tree picker for the tracked stack. Use the arrow keys or `j`/`k` to move, `Enter` to switch, and `Esc` or `q` to cancel.

### Sync stacks

Run `dgr sync` to reconcile your local branches, dagger's tracked stack metadata, and GitHub pull requests:
Expand Down
5 changes: 5 additions & 0 deletions src/cli/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ mod operation;
mod orphan;
mod pr;
mod reparent;
mod switch;
mod sync;
mod tree;

Expand Down Expand Up @@ -58,6 +59,9 @@ enum Commands {
/// Continue a paused restack sequence
Sync(sync::SyncArgs),

/// Switch to a branch directly or choose one from the tracked tree
Switch(switch::SwitchArgs),

/// Print the tracked branch stacks as a shared tree from trunk
Tree(tree::TreeArgs),
}
Expand All @@ -81,6 +85,7 @@ pub fn run() -> ExitCode {
Commands::Pr(args) => pr::execute(args),
Commands::Reparent(args) => reparent::execute(args),
Commands::Sync(args) => sync::execute(args),
Commands::Switch(args) => switch::execute(args),
Commands::Tree(args) => tree::execute(args),
};

Expand Down
Loading
Loading