Troubleshooting¶
Solutions to common issues with Stack.
Installation Issues¶
"command not found: gt"¶
The binary isn't in your PATH. After cargo install:
# Check if it's installed
ls ~/.cargo/bin/gt
# Add to PATH (add to ~/.bashrc or ~/.zshrc)
export PATH="$HOME/.cargo/bin:$PATH"
Build errors¶
Ensure you have the required dependencies:
# Ubuntu/Debian
sudo apt install build-essential pkg-config libssl-dev
# macOS
xcode-select --install
# Fedora
sudo dnf install gcc openssl-devel
Initialization Issues¶
"Not a git repository"¶
Stack must be run inside a Git repository:
"Stack not initialized"¶
Initialize Stack first:
"Already initialized"¶
This is just a warning. Your existing configuration is preserved.
Authentication Issues¶
"Authentication required"¶
Re-authenticate with your provider:
"Bad credentials"¶
Your token may be expired or revoked:
- Generate a new token
- Re-authenticate:
"Permission denied"¶
Ensure your token has the required scopes:
- GitHub:
repo,read:user - GitLab:
api,read_user
OAuth flow doesn't complete¶
Try token-based auth instead:
Sync Issues¶
"Conflict during rebase"¶
Resolve conflicts manually:
# See conflicted files
git status
# Edit and resolve
vim conflicted-file.rs
# Mark as resolved
git add conflicted-file.rs
# Continue
gt continue
"Branch has diverged"¶
Your local branch differs from remote:
# Option 1: Force push (if you're the only one working on it)
gt submit
# Option 2: Merge remote changes
git pull --rebase origin branch-name
"Remote branch not found"¶
The branch may have been deleted:
Submit Issues¶
"PR creation failed"¶
Check:
- Authentication:
gt auth status - Network connectivity
- Repository permissions
"Base branch mismatch"¶
Run sync to update base branches:
PRs show wrong diff¶
Ensure your stack is properly rebased:
Performance Issues¶
Stack is slow¶
For large repositories:
Many branches slow down operations¶
Clean up merged branches:
Recovery¶
Undo a mistake¶
Undo multiple operations¶
Abort current operation¶
Reset Stack completely¶
If Stack's state is corrupted:
# Remove Stack metadata (keeps Git branches)
rm -rf .git/stack
# Re-initialize
gt init
# Re-track your branches
gt track branch-1 --parent main
gt track branch-2 --parent branch-1
Getting Help¶
Enable debug logging¶
Check version¶
Report a bug¶
Include in your bug report:
- Stack version
- Git version (
git --version) - Operating system
- Full command and output
- Steps to reproduce
Open issues at: github.com/neul-labs/stkd/issues