Skip to content

Support switching to remote branches - #10

Merged
melonamin merged 2 commits into
melonamin:mainfrom
mishamsk:mp/add-support-for-switching-to-remote-branch
Jun 3, 2026
Merged

melonamin merged 2 commits into
melonamin:mainfrom
mishamsk:mp/add-support-for-switching-to-remote-branch

Conversation

@mishamsk

@mishamsk mishamsk commented Jun 2, 2026 •

Copy link
Copy Markdown
Contributor

Adds git-switch-like remote branch handling for gt .

  • Reuses local branches, otherwise creates tracking branches from matching remotes
  • Covers unfetched origin branches with an e2e test
  • Clarifies branch selection behavior in docs

Checks: just check

@mishamsk
mishamsk force-pushed the mp/add-support-for-switching-to-remote-branch branch 2 times, most recently from 6dc9f1c to a36db26 Compare June 2, 2026 22:33
@mishamsk
mishamsk force-pushed the mp/add-support-for-switching-to-remote-branch branch from a36db26 to ad97c30 Compare June 2, 2026 23:04
@mishamsk

mishamsk commented Jun 3, 2026

Copy link
Copy Markdown
Contributor Author

@melonamin ready for you!

git's --track sanity-checks that the start point matches the configured
fetch refspec, which fails for branches outside it even after an explicit
fetch. Use --no-track and write upstream config directly so gt works in
single-branch clones the same as in full clones.

Adds e2e tests for: single-branch clone fetch path, multi-remote conflict,
checkout.defaultRemote disambiguation, and defaultRemote fallthrough.
@melonamin

Copy link
Copy Markdown
Owner

LGTM, thanks for the contribution

@melonamin
melonamin merged commit d1ece42 into melonamin:main Jun 3, 2026
5 checks passed
@mishamsk
mishamsk deleted the mp/add-support-for-switching-to-remote-branch branch June 3, 2026 13:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants