Skip to content

Fix render --reset=false not fast-forwarding existing branches to latest remote#24

Merged
milldr merged 1 commit intomainfrom
fix/render-reset-pull
Mar 13, 2026
Merged

Fix render --reset=false not fast-forwarding existing branches to latest remote#24
milldr merged 1 commit intomainfrom
fix/render-reset-pull

Conversation

@milldr
Copy link
Owner

@milldr milldr commented Mar 13, 2026

What

When creating a worktree from an existing branch with --reset=false, call updateWorktreeRemote() to fast-forward the branch to origin/<branch> after checkout.

Why

The local branch ref in the bare repo can be stale when another worktree already has that branch checked out — git skips updating checked-out branches during fetch --all. Without the fast-forward, the new worktree would be created pointing at a stale commit instead of the latest remote state.

@milldr milldr added the patch Patch version bump label Mar 13, 2026
@milldr milldr merged commit 4d8c63f into main Mar 13, 2026
3 checks passed
@milldr milldr deleted the fix/render-reset-pull branch March 13, 2026 20:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

patch Patch version bump

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant