rtk-ai / rtk-ai/rtk

[BUG] rtk git branch -a omits remote branches; -r works correctly

Open
#2,137 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

area:cli bug help wanted platform:macos priority:high
Dominant language
Rust
Stars
81.1k
Forks
5.1k
Avg merge
4d 21h
Merged PRs (30d)
35

Description

Description

rtk git branch -a only outputs the current local branch, silently dropping all remotes/origin/* lines. The -r flag works correctly and shows remote branches.

Steps to reproduce

# Repo with a pushed remote (origin/main)
rtk git branch -a
# Output:
# * main

rtk git branch -r
# Output:
# *
#   origin/HEAD -> origin/main
#   origin/main

# Native git (bypassing rtk) works correctly:
/usr/bin/git branch -a
# * main
#   remotes/origin/HEAD -> origin/main
#   remotes/origin/main

Expected behavior

rtk git branch -a should display both local and remote-tracking branches, matching native git branch -a output.

Environment

  • rtk version: 2.3.3
  • OS: macOS Darwin 25.5.0
  • Shell: zsh

Notes

  • rtk help for git branch describes it as "Compact branch listing (current/local/remote)", suggesting remote display is intended.
  • Workaround: use /usr/bin/git branch -a to bypass the hook.
  • Related: #1499 (branch -vv strips tracking markers)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the rtk git branch command path and compare its handling of -a with the working -r path and native /usr/bin/git branch -a. Reproduce the issue in a repository with origin/main; done means rtk git branch -a includes local and remote-tracking branches like native Git.

Written by the indexing model from the issue text.

Assessment

Tech stack
git, rust
Domain
cli, devtools
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
72/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.