⬡Remotes & Sync
One accented button to get up to date, plus the granular fetch / pull / push trio — with safety rails: a lease-protected force-push, transparent upstream setup, and a timeout so a credential prompt can't freeze the panel.
Smart Sync (fetch + integrate)
The primary "bring me up to date" action for the current branch, so you don't have to reason about fetch vs pull vs rebase vs push. It does the most it safely can in one click — but only the reversible part runs unattended.
Entry points
- Action railThe accented Sync button (tooltip "Smart Sync").
What happens next
- Always fetch first, then look at the branch's state.
- Clean tree, only behind → a fast-forward pull runs
silently. It's fully reversible (the Undo
button →
reset --hard ORIG_HEAD), so no prompt. - Diverged, dirty, or you're ahead → one descriptive yes/no confirm spells out the plan ("stash your changes · rebase your 1 commit onto the 4 incoming · push · restore"), because a rebase/stash is bigger and a push can't be undone. Cancel to do it yourself with the Pull / Push buttons.
- On confirm it runs the plan via stash / pull.mode (rebase) / push, then flashes a receipt ("Synced · pulled 4 · pushed 1"). Log, tree and status refresh.
Status-bar pills (one-click sync actions)
The main panel's status bar turns the ahead/behind state into a single clickable pill — the right remote action for where the branch is, without opening the action rail. Each pill runs the exact same handler as its rail button.
Entry points
- Status barThe ahead/behind pill in the main-panel status bar (it shows only when there's something to do).
Which pill shows
- ↑ Publish — on a branch with no upstream → runs push as
push -u origin HEAD(push + set upstream in one click). A detached HEAD keeps its own "create a branch" banner instead. - ↓ N Pull — when behind → the same action as the rail Pull button.
- ↑ N Push — when ahead → the rail Push (which still offers force-with-lease on a non-fast-forward rejection).
- ⇅ Sync — when diverged (ahead and behind) → the full Smart Sync. Shown only when diverged; a purely ahead/behind branch already gets the directional Push/Pull pill.
Driven by status.hasUpstream / ahead / behind; the Sync and Publish pills use VS Code's prominent status-bar accent tokens.
Fetch fetch
- Action railFetch button.
Updates remote-tracking refs without touching your working tree. Ahead/behind counts refresh afterward. Runs with --prune, so branches deleted on the remote disappear from the tree instead of lingering. Fetch also refreshes origin/HEAD (remote set-head --auto) so the default-branch marker heals itself.
Pull + pull mode pull
Entry points
- Action railPull button — highlighted teal when there are commits to pull.
- Branch menuPull into '<current>' Using Rebase or Using Merge.
- Plain pull runs pull (with
--prune). - The rebase/merge variants set the strategy via pull.mode with
{ mode }. - A conflicting pull pauses with the resolution banner.
Push push
- Action railPush button.
- SidebarCommit & Push.
- Commit menuPush All up to Here….
Runs push with an optional { branch }. The two safety behaviours below apply automatically.
Safe force-push push.force
- When a push is rejected (non-fast-forward), HydraGit offers a force-with-lease push.
- push.force runs
--force-with-lease, which refuses to clobber remote commits you haven't fetched.
Auto-set upstream on first push
- A push on a branch with no upstream would normally fail with
fatal: ...has no upstream branch. - HydraGit transparently retries with
push -u origin HEAD, so that wall never reaches you.
Remote branch delete branch.delete.remote
- Branch menuDelete flow on a branch with a remote counterpart.
Deletes the branch on the remote via push <remote> --delete and prunes the local tracking ref. See also delete branch.