Shell Integration for Worktrees¶
Shell integration enables automatic directory changes when opening or creating worktrees. Without it, you need to manually cd into worktree directories.
Quick Setup¶
Add the appropriate line to your shell config:
# Add to ~/.zshrc
eval "$(stackit shell zsh)"
# Add to ~/.bashrc
eval "$(stackit shell bash)"
# Add to ~/.config/fish/config.fish
stackit shell fish | source
Then restart your shell or source the config.
What It Enables¶
With shell integration, worktree commands change your working directory automatically:
stackit worktree create my-feature --open # Creates and cd's into worktree
stackit worktree open my-feature # Opens existing worktree
Without Shell Integration¶
Navigate manually using command substitution:
cd $(stackit worktree open my-feature)
Full Guide¶
For complete setup instructions, troubleshooting, and how it works:
Shell Integration (Full Guide) →