Common issues and solutions.
Your GitHub token is invalid or expired.
# Check your token
echo $GHSTACK_OAUTH_TOKEN
# Generate a new token at https://github.com/settings/tokens
# Required scope: repo
export GHSTACK_OAUTH_TOKEN='<new token>'The environment variable isn't set.
export GHSTACK_OAUTH_TOKEN='<your token>'
# Or add to .gh-stack.env in your project root
echo "GHSTACK_OAUTH_TOKEN=<your token>" > .gh-stack.env- Verify the identifier exists in PR titles
- Check you're searching the right repository
- Use
-r owner/repoto specify the repository explicitly
# Debug: search manually
gh pr list --search 'IDENTIFIER in:title'The identifier matched PRs in multiple repositories.
# Specify repository explicitly
gh-stack log 'STACK-ID' -r 'owner/repo'
# Or set the environment variable
export GHSTACK_TARGET_REPOSITORY='owner/repo'PRs must have their base branch set correctly:
- Bottom PR: base is
main(or your default branch) - Each PR above: base is the branch below it
# 1. Resolve conflicts in your editor
# 2. Stage resolved files
git add <resolved files>
# 3. Continue cherry-picking
git cherry-pick --continuegh-stack autorebase 'STACK-ID' -C /path/to/repo
# Or from the repo directory:
gh-stack autorebase 'STACK-ID' -C .# Fetch latest from remote
git fetch origin
# Reset local branch to remote
git checkout <branch>
git reset --hard origin/<branch>Get approval on the PR, or skip the check:
gh-stack land 'STACK-ID' --no-approvalMark the PR as ready for review on GitHub, then retry.
Check branch protection rules on the repository. The PR may need:
- Passing CI checks
- Required reviewers
- Up-to-date branch
Closed/merged PRs are hidden by default.
gh-stack log 'STACK-ID' --include-closedRun from inside a git repository, or specify the path:
gh-stack log 'STACK-ID' -C /path/to/repoOpen an issue: https://github.com/luqven/gh-stack/issues