railway add --repo supports selecting a branch
Introduced 2026-06-04 · score 0.92
HOW TO USE IT
When creating a service from a GitHub repository, pass `--repo <REPO>` and `--branch <BRANCH>` to `railway add` to target the branch. The add command documentation does not list `--branch`, so the full invocation is not verified there.
WHY THIS HELPS
Create a Railway service from a GitHub repository targeting a specific branch.
REQUIREMENTS AND LIMITATIONS
- Version: v4.67.0
- --repo <REPO> (required): GitHub repository to create the service from; documented add syntax uses `owner/repo`.
- --branch <BRANCH> (required): Branch to target. Railway documents this option for `railway service source connect`, but not for `railway add`.
- Docs conflict: The official add page lists `-r, --repo <REPO>` but does not list `--branch`; the official service page documents `--branch` only for `railway service source connect`. The release note says `railway add --repo` supports it in v4.67.0.
FIRST-PARTY EVIDENCE
- https://github.com/railwayapp/cli/releases/tag/v4.67.0
- https://github.com/railwayapp/cli/pull/934
- https://docs.railway.com/cli/add
- https://docs.railway.com/cli/service
Check the installed version and the source before using it. Entry JSON