Skip to main content

set_upstream_tracking

Function set_upstream_tracking 

Source
pub fn set_upstream_tracking(
    worktree: &WorktreeDescriptor,
    remote: &str,
    remote_ref: &str,
) -> Result<()>
Expand description

Set upstream tracking for a worktree branch

Configures the branch in the worktree to track a remote branch by setting branch.*.remote and branch.*.merge configuration entries.

This is particularly important for PR worktrees to ensure they properly track the PR’s remote branch.