[BUG] rtk git branch -a omits remote branches; -r works correctly
Open
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 helpforgit branchdescribes it as "Compact branch listing (current/local/remote)", suggesting remote display is intended.- Workaround: use
/usr/bin/git branch -ato bypass the hook. - Related: #1499 (
branch -vvstrips tracking markers)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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