Skip to content

Add pull-before-branch instruction to CLAUDE.md injection#26

Merged
josephfung merged 2 commits into
mainfrom
fix/pull-before-branch
Apr 28, 2026
Merged

Add pull-before-branch instruction to CLAUDE.md injection#26
josephfung merged 2 commits into
mainfrom
fix/pull-before-branch

Conversation

@josephfung
Copy link
Copy Markdown
Owner

Summary

  • Adds a "Always pull before branching" section to settings/claude-md.md so Claude always runs git pull --ff-only origin main before creating worktrees or branches
  • Uses --ff-only to fail cleanly if local main has diverged, rather than silently creating a merge commit
  • Bumps version to 0.5.1

Test plan

  • All 13 existing claude-md.bats tests pass
  • Run install.sh and verify the new section appears in ~/.claude/CLAUDE.md inside the TrimKit block

Instructs Claude to always pull latest main before creating a worktree
or branch, avoiding stale-code rebases and merge conflicts.

Bumps version to 0.5.1.
Prevents git pull from silently creating a merge commit if local main
has diverged. --ff-only aborts cleanly, surfacing the problem instead.
@josephfung josephfung merged commit 96f0733 into main Apr 28, 2026
2 checks passed
josephfung added a commit that referenced this pull request Apr 28, 2026
Group pull-before-branch (PR #26) and issue tracker hygiene under a new
0.5.1 section. Mark 0.5.0 as released.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant