merge-strategy
Skill1.1k starsChanged 59 days agoMITView on GitHub
Git merge strategies, conflict resolution approaches, merge vs rebase recommendations, and branch integration patterns in sidecar. Covers pull strategy menu, direct merge workflow, squash merge, commit message templates, configurable defaults, and protected branches. Use when working on git merge features or making decisions about merge strategies.
- Commits and pushes
Trending
Quiet since October.about the whole repository
Who's talking about marcus/sidecar
- chenrui333/homebrew-tap“sidecar 1.16.0”GitHub · Oct 5, 2026 · 1 reactions
- chenrui333/homebrew-tap“sidecar 1.14.0”GitHub · Sep 23, 2026 · 1 reactions
- chenrui333/homebrew-tap“sidecar 1.13.0”GitHub · Sep 3, 2026 · 1 reactions
- chenrui333/homebrew-tap“sidecar 1.11.2”GitHub · Aug 31, 2026 · 1 reactions
- chenrui333/homebrew-tap“sidecar 1.9.0”GitHub · Aug 27, 2026 · 1 reactions
The biggest 5 of 48 mentions linking to the repository that our crawl found. Each line is their own headline.
See all 48
Talked about on GitHub and Bluesky (48 times).
On GitHub · 47
- Oct 5, 2026sidecar 1.16.0 — chenrui333/homebrew-tap1 reaction · 1 comment
- Sep 23, 2026sidecar 1.14.0 — chenrui333/homebrew-tap1 reaction · 2 comments
- Sep 3, 2026sidecar 1.13.0 — chenrui333/homebrew-tap1 reaction · 1 comment
- Aug 31, 2026sidecar 1.11.2 — chenrui333/homebrew-tap1 reaction · 1 comment
- Aug 27, 2026sidecar 1.9.0 — chenrui333/homebrew-tap1 reaction · 1 comment
42 more on GitHub
- Aug 26, 2026sidecar 1.8.0 — chenrui333/homebrew-tap1 reaction · 1 comment
- Aug 25, 2026sidecar 1.7.0 — chenrui333/homebrew-tap1 reaction · 1 comment
- Aug 25, 2026sidecar 1.6.0 — chenrui333/homebrew-tap1 reaction · 1 comment
- Aug 24, 2026sidecar 1.5.0 — chenrui333/homebrew-tap1 reaction · 1 comment
- Aug 23, 2026sidecar 1.4.0 — chenrui333/homebrew-tap1 reaction · 1 comment
- Aug 21, 2026sidecar 1.3.0 — chenrui333/homebrew-tap1 reaction · 1 comment
- Aug 21, 2026sidecar 1.2.2 — chenrui333/homebrew-tap1 reaction · 1 comment
- Aug 20, 2026sidecar 1.2.1 — chenrui333/homebrew-tap1 reaction · 1 comment
- Aug 20, 2026sidecar 1.2.0 — chenrui333/homebrew-tap1 reaction · 1 comment
- Aug 19, 2026sidecar 1.1.1 — chenrui333/homebrew-tap1 reaction · 1 comment
- Aug 19, 2026sidecar 1.1.0 — chenrui333/homebrew-tap1 reaction · 1 comment
- Aug 18, 2026sidecar 1.0.3 — chenrui333/homebrew-tap1 reaction · 1 comment
- Aug 17, 2026sidecar 1.0.2 — chenrui333/homebrew-tap1 reaction · 1 comment
- Aug 17, 2026sidecar 1.0.1 — chenrui333/homebrew-tap1 reaction · 1 comment
- Aug 17, 2026sidecar 1.0.0 — chenrui333/homebrew-tap1 reaction · 1 comment
- Aug 14, 2026sidecar 0.99.1 — chenrui333/homebrew-tap1 reaction
- Aug 14, 2026sidecar 0.99.0 — chenrui333/homebrew-tap1 reaction
- Aug 13, 2026sidecar 0.98.0 — chenrui333/homebrew-tap1 reaction
- Aug 12, 2026sidecar 0.97.0 — chenrui333/homebrew-tap1 reaction
- Aug 11, 2026sidecar 0.96.0 — chenrui333/homebrew-tap1 reaction
- Aug 11, 2026sidecar 0.95.0 — chenrui333/homebrew-tap1 reaction
- Aug 8, 2026sidecar 0.93.0 — chenrui333/homebrew-tap1 reaction
- Aug 7, 2026sidecar 0.92.0 — chenrui333/homebrew-tap1 reaction
- Aug 2, 2026sidecar 0.91.0 — chenrui333/homebrew-tap1 reaction
- Jul 31, 2026sidecar 0.90.0 — chenrui333/homebrew-tap1 reaction
- Jul 30, 2026sidecar 0.89.0 — chenrui333/homebrew-tap1 reaction
- Jul 28, 2026sidecar 0.88.2 — chenrui333/homebrew-tap1 reaction
- Jul 27, 2026sidecar 0.88.1 — chenrui333/homebrew-tap1 reaction
- Jul 25, 2026sidecar 0.87.1 — chenrui333/homebrew-tap1 reaction
- Jun 19, 2026sidecar 0.86.0 — chenrui333/homebrew-tap1 reaction
- Oct 3, 2026agent-skills.github.marcus.sidecar: 1.14.0 → 1.15.1 — sudosubin/agents.nix0 reactions
- Oct 1, 2026sidecar 1.15.1 — chenrui333/homebrew-tap0 reactions · 2 comments
- Sep 29, 2026agent-skills.github.marcus.sidecar: init at 1.14.0 — sudosubin/agents.nix0 reactions
- Sep 7, 2026Add Sidecar — manuelmeurer/agentmgmt0 reactions · 1 comment
- Apr 18, 2026sidecar 0.84.0 — chenrui333/homebrew-tap0 reactions
- Apr 17, 2026Feedback — sidequery/ghostree0 reactions
- Mar 24, 2026sidecar 0.83.0 — chenrui333/homebrew-tap0 reactions
- Mar 21, 2026sidecar 0.80.0 — chenrui333/homebrew-tap0 reactions
- Mar 21, 2026sidecar 0.79.0 — chenrui333/homebrew-tap0 reactions
- Mar 10, 2026sidecar 0.78.0 — chenrui333/homebrew-tap0 reactions
- Feb 10, 2026Research: Deep analysis of Sidecar - alignment check and alternatives — JulianDouma/speckle0 reactions
- Feb 9, 2026[Feature]: Persistent plan/todo tracking and checkpoints between plans — code-yeongyu/oh-my-openagent0 reactions · 6 comments
On Bluesky · 1
- Mar 4, 2026Great write up! The failures are especially valuable, watching this very closely. It might make sense to move merges to a subagent of the… — @faz.ms1 likes and repost
In this repository20 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- coordinate-agentsSkill
- create-adapterSkill
- create-modalSkill
- create-pluginSkill
- create-promptSkill
- create-themeSkill
- drag-paneSkill
- feature-flagsSkill
- inline-editorSkill
- keyboard-shortcutsSkill
- port-herdr-integrationSkill
- profile-memorySkill
- project-switchingSkill
- release-sidecarSkill
- shell-integrationSkill
- sidecar-websiteSkill
- ui-featuresSkill
- worktree-switchingSkill
The file
We split this skill into the rules it gives an agent
10 rules. About 0 are common, 4 are distinctive, and 6 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈4
Distinctive · estimate
This author's own choices. Worth a look.
6
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 36
Create PR via gh pr create
- Distinctive: line 37
Wait for PR merge (polling)
- Very specific: line 50
When on base branch: git pull --ff-only origin <branch> (hardcoded)
- Very specific: line 119
If defaultPullStrategy is set, execute directly (skip menu)
- Distinctive: line 120
If unset, show menu as today
- Distinctive: line 121
Consider adding "Always use this" option to menu
- Distinctive: line 153
After git merge --squash, a separate commit is needed:
- Very specific: line 205
Open source: default squash, PR workflow recommended
- Very specific: line 206
Internal teams: default no-ff, direct merge acceptable
- Very specific: line 207
Solo developers: default rebase or ff, direct merge for speed
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Merge Strategy Configuration
This skill covers sidecar's git merge and pull operations, their current implementation, known gaps, and recommended configuration patterns.
Current Implementation
Git Status Plugin Pull Strategies
Location: internal/plugins/gitstatus/pull_menu.go, internal/plugins/gitstatus/remote.go
The git-status plugin offers four pull strategies via a modal menu:
| Strategy | Command | Use Case |
| Pull (merge) | git pull | Creates merge commit, preserves branch topology |
| Pull (rebase) | git pull --rebase | Replays local commits on top of upstream |
| Pull (fast-forward only) | git pull --ff-only | Only pulls if fast-forward possible (safest) |
| Pull (rebase + autostash) | git pull --rebase --autostash | Rebase with automatic stash/unstash |
Workspace Plugin Merge Workflows
Location: internal/plugins/workspace/merge.go
PR Workflow:
- Push branch to remote
- Create PR via
gh pr create - Wait for PR merge (polling)
- Cleanup: delete worktree, branches, pull base
Direct Merge (No PR) at merge.go:430-498:
1. git fetch origin <baseBranch>
2. git checkout <baseBranch>
3. git pull origin <baseBranch>
4. git merge <branch> --no-ff -m "Merge branch '<branch>'" // Hardcoded --no-ff
5. git push origin <baseBranch>Post-Merge Pull at merge.go:500-551:
- When on base branch:
git pull --ff-only origin <branch>(hardcoded) - Otherwise:
git fetch+git update-ref
Divergence Resolution at merge.go:644-705:
- Rebase option:
git pull --rebase origin <branch> - Merge option:
git pull origin <branch>
Known Issues and Gaps
- No configurable defaults -- users must select strategy every time
- Limited merge strategies -- direct merge hardcoded to
--no-ff, missing--ff,--ff-only,--squash, rebase-based integration - No squash merge support -- no clean-history option for main branch
- Hardcoded commit messages --
fmt.Sprintf("Merge branch '%s'", branch), no templates - Missing safety options -- no GPG signing, no
--verify-signatures, no--force-with-lease - Autostash inconsistency -- available for pull-rebase but not post-merge pull or divergence resolution
- No upstream tracking config -- remote always
origin, no configurable tracking - Limited conflict recovery -- only abort or dismiss, no continue/skip rebase
- No interactive rebase -- no squash/reorder/edit before merge
Recommended Configuration Schema
Add to internal/config/config.go:
type GitConfig struct {
DefaultPullStrategy string `json:"defaultPullStrategy,omitempty"` // "merge", "rebase", "ff-only", "autostash"
DefaultMergeStrategy string `json:"defaultMergeStrategy,omitempty"` // "no-ff", "ff", "ff-only", "squash", "rebase"
MergeCommitTemplate string `json:"mergeCommitTemplate,omitempty"` // Go template: .Branch, .BaseBranch, .PRTitle, .PRNumber
SignCommits bool `json:"signCommits,omitempty"`
SignMerges bool `json:"signMerges,omitempty"`
AutostashOnPull bool `json:"autostashOnPull,omitempty"`
DefaultRemote string `json:"defaultRemote,omitempty"` // Default: "origin"
SetUpstreamOnPush bool `json:"setUpstreamOnPush,omitempty"`
ProtectedBranches []string `json:"protectedBranches,omitempty"` // e.g. ["main", "master", "release/*"]
PreMergeChecks []string `json:"preMergeChecks,omitempty"` // e.g. ["go test ./..."]
}Add to PluginsConfig:
type PluginsConfig struct {
Git GitConfig `json:"git"`
GitStatus GitStatusPluginConfig `json:"git-status"`
// ... existing fields
}Example user config (~/.config/sidecar/config.json):
{
"plugins": {
"git": {
"defaultPullStrategy": "rebase",
"defaultMergeStrategy": "squash",
"mergeCommitTemplate": "Merge {{.Branch}} into {{.BaseBranch}}",
"signCommits": true,
"autostashOnPull": true,
"protectedBranches": ["main", "production"]
}
}
}Implementation Priorities
Priority 1: Default Pull Strategy
Files: internal/config/config.go, internal/plugins/gitstatus/pull_menu.go, internal/plugins/gitstatus/update_handlers.go
- If
defaultPullStrategyis set, execute directly (skip menu) - If unset, show menu as today
- Consider adding "Always use this" option to menu
Priority 2: Default Merge Strategy
File: internal/plugins/workspace/merge.go -- performDirectMerge()
func (p *Plugin) performDirectMerge(wt *Worktree) tea.Cmd {
strategy := p.ctx.Config.Plugins.Git.DefaultMergeStrategy
if strategy == "" {
strategy = "no-ff" // backward compatible default
}
var mergeArgs []string
switch strategy {
case "ff":
mergeArgs = []string{"merge", branch, "-m", mergeMsg}
case "ff-only":
mergeArgs = []string{"merge", branch, "--ff-only"}
case "squash":
mergeArgs = []string{"merge", branch, "--squash"}
case "rebase":
// 1. git rebase baseBranch branch
// 2. git checkout baseBranch
// 3. git merge branch --ff-only
default: // "no-ff"
mergeArgs = []string{"merge", branch, "--no-ff", "-m", mergeMsg}
}
}Priority 3: Squash Merge Support
After git merge --squash, a separate commit is needed:
case "squash":
mergeCmd := exec.Command("git", "merge", branch, "--squash")
// execute...
commitMsg := fmt.Sprintf("Squash merge branch '%s'", branch)
commitCmd := exec.Command("git", "commit", "-m", commitMsg)Priority 4: Merge Commit Templates
type MergeTemplateData struct {
Branch, BaseBranch, PRTitle, PRNumber string
}
func renderMergeMessage(tmpl string, data MergeTemplateData) (string, error) {
if tmpl == "" {
tmpl = "Merge branch '{{.Branch}}'"
}
t, err := template.New("merge").Parse(tmpl)
// ... execute template
}Priority 5: Protected Branch Warnings
func isProtectedBranch(branch string, patterns []string) bool {
for _, pattern := range patterns {
if matched, _ := filepath.Match(pattern, branch); matched {
return true
}
}
return false
}Show confirmation modal before direct merge to protected branches.
Strategy Comparison
| Strategy | History | Commit Count | Best For |
No Fast-Forward (--no-ff) | Preserves branch topology | +1 merge commit | Feature branches, audit trails |
Fast-Forward (--ff) | Linear when possible | No extra commits | Small changes, single commits |
Fast-Forward Only (--ff-only) | Always linear | Fails if not possible | Strict linear history |
| Squash | Linear | Single commit | Clean history, large features |
| Rebase | Linear, preserves commits | No merge commit | Clean history with detail |
Team Recommendations
- Open source: default
squash, PR workflow recommended - Internal teams: default
no-ff, direct merge acceptable - Solo developers: default
rebaseorff, direct merge for speed
Related Files
| File | Purpose |
internal/config/config.go | Config struct definitions |
internal/config/loader.go | Config loading and defaults |
internal/plugins/gitstatus/remote.go | Pull/fetch operations |
internal/plugins/gitstatus/pull_menu.go | Pull strategy UI |
internal/plugins/workspace/merge.go | Merge workflow |
internal/plugins/workspace/diff.go | Base branch detection |
internal/plugins/workspace/worktree.go | Branch operations |
Migration Notes
- Empty config = current behavior -- all new fields default to empty/false
- Config validation -- warn on invalid strategy names, do not fail
- Backward compatibility -- if changing defaults, provide migration warnings
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

