Description 582 -> 237 chars, body 1217 -> 290 words. The single remotes.md splits into config, fetch, push, and pull flow files. Restores the confirm: true token to the force-push gate -- it is the git plugin's cross-skill contract, gated on by git-orchestrate and git-branches. Moves push.md's worked example off main, which the skill's own Step 1 refuses, and restores the never-bare---force directive.
2.0 KiB
2.0 KiB
topic, source_keys
| topic | source_keys | ||
|---|---|---|---|
| pull |
|
Pulling
Default strategy: --ff-only. It fails on divergence, which forces a conscious choice instead of an accidental merge commit.
- Fast-forward only:
git pull --ff-only— the recommended default - Rebase:
git pull --rebasereplays your commits on top for linear history, but rewrites SHAs. Verify nothing being replayed has been pushed: rebasing published commits breaks everyone downstream. - Merge:
git pull --no-rebase— three-way merge commit, preserves original commits, non-linear - Rebase preserving merges:
git pull --rebase=mergeskeeps intentional local merge commits during the replay - Stage without committing:
git pull --squashcollapses incoming commits into staged changes; you write the message - Merge strategy: Git 2.34+ defaults to
ort(recursiveis now an alias for it). Strategy options such as-X ours,-X theirs,-X ignore-space-changepass through unchanged. - Submodules:
--recurse-submodulesonly fetches submodules already checked out. Newly added ones are not initialized — use thegit-submodulesskill for those.
On divergence
A pull that diverges with no strategy configured fails, and that failure is the useful outcome. Report the divergence and the three ways out — --ff-only, --rebase, --no-rebase — and let the caller choose. Auto-merging a diverged branch buries a decision that belongs to the human.
Config precedence
Highest wins:
- Command-line flag (
--ff-only/--rebase/--no-rebase) pull.rebaseconfig (global or local)branch.<name>.rebase(branch-specific override)branch.autoSetupRebase(set automatically when the tracking branch was created)
git config pull.ff only # deterministic default across Git versions
git config --global pull.rebase true
git config branch.develop.rebase false # develop always merges, regardless of the global default