Files
holocron/plugins/git/.apm/skills/git-remotes/references/pull.md
Defame1297 2c6ce438b6 refactor(git): normalize rtk-prefix usage, add metadata.version
Two bundled fixes across the same nine skills, since both touch the
same files.

Issue #113: skill prose used rtk git and bare git inconsistently for
the same operations, with no stated rule for which applied where.
Executable instructed commands (a dispatch-table "Run" cell, a fenced
code-block procedure, an imperative step) now consistently use rtk
git; illustrative or referential mentions -- naming a flag's behavior,
quoting a doc heading, warning against an anti-pattern -- stay bare
git. Documented in the new plugins/git/README.md, scoped to this
plugin only: gitea-* skills talk to the server over MCP tools and
carry no git/rtk mentions at all.

Also the git-plugin slice of #127: metadata.version added to the
eight skills that lacked it. git-commits already had one and is
untouched.

Fixes: #113
Fixes: #127
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EeH8SCbcrCAQrtymkNuhKP
2026-09-07 20:36:49 +00:00

2.4 KiB

topic, source_keys
topic source_keys
pull
git-scm-pull-docs
context7-git-htmldocs

Pulling

Default strategy: --ff-only. It fails on divergence, which forces a conscious choice instead of an accidental merge commit.

  • Fast-forward only: rtk git pull --ff-only — the recommended default
  • Rebase: rtk git pull --rebase replays your commits on top for linear history, but rewrites SHAs. Verify nothing being replayed has been pushed: rebasing published commits breaks everyone downstream.
  • Merge: rtk git pull --no-rebase — three-way merge commit, preserves original commits, non-linear
  • Rebase preserving merges: rtk git pull --rebase=merges keeps intentional local merge commits during the replay
  • Stage without committing: rtk git pull --squash collapses incoming commits into staged changes; you write the message
  • Merge strategy: Git 2.34+ defaults to ort (recursive is now an alias for it). Strategy options such as -X ours, -X theirs, -X ignore-space-change pass through unchanged.
  • Submodules: --recurse-submodules only fetches submodules already checked out. Newly added ones are not initialized — use the git-submodules skill 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

--ff-only is not Git's default on an unset config, and never has been. Older versions silently merged on divergence; current ones refuse outright — verified on Git 2.39.5, a divergent pull with nothing configured prints the reconciliation hint and exits 128 with fatal: Need to specify how to reconcile divergent branches. The behaviour therefore still varies by installed version, and neither variant is the one you want. Set it explicitly.

Highest wins:

  1. Command-line flag (--ff-only / --rebase / --no-rebase)
  2. pull.rebase config (global or local)
  3. branch.<name>.rebase (branch-specific override)
  4. branch.autoSetupRebase (set automatically when the tracking branch was created)
rtk git config pull.ff only                  # deterministic default across Git versions
rtk git config --global pull.rebase true
rtk git config branch.develop.rebase false   # develop always merges, regardless of the global default