modern-git-patterns
Use when working with git commands, planning git workflows, advising on git best practices, or needing version-aware git guidance.
Skill by kvithayathil
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/kvithayathil-modern-git-patterns
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: productivity
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
- Runs as
- Shell scripts
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/modern-git-patterns
What's inside
- Skill name
modern-git-patterns- Description
- Use when working with git commands, planning git workflows, advising on git best practices, or needing version-aware git guidance. Provides modern patterns, commands, and approaches for git 2.50+. Covers history rewriting, maintenance, sparse operations, config-based hooks, signing, blame techniques, partial clone, and workflow patterns. Triggers on: git, rebase, merge, branch, commit, blame, diff, bisect, worktree, stash, submodule, hook, maintenance, sparse-checkout, partial clone, signing, force push, reflog, cherry-pick.
- License
- Apache-2.0
- Metadata
- author: kvithayathil · living: true · version: 1.0.0 · last-reviewed: 2026-04-21 · self-learning: true · self-updating: true · update-policy: evolve-on-evidence · min-git-version: 2.50.0 · verified-git-version: 2.54.0
- Instructions
- 473 lines in SKILL.md · view on GitHub
Before installing
- Ships executable scripts
- Instructions read files in your home folder (~/.ssh, ~/.aws…)
Files (8)
- SKILL.md
- CHANGELOG.md · references/
- COMMAND_QUICK_REFERENCE.md · references/
- DETAILED_PATTERNS.md · references/
- LESSONS_LEARNED.md · references/
- SOURCES.md · references/
- VERSION_FEATURE_MAP.md · references/
- reject-internal-dirs.sh · scripts/
SKILL.md (first lines)
# Modern Git Patterns, Commands & Approaches Version-aware git guidance grounded in git 2.50–2.54 release notes, expert talks, and real-world practice. ## Version Detection Before advising on any git command, check the available version: ```bash git --version ``` If version < 2.50, note that many patterns below are unavailable or behave differently. Feature availability annotations use `[2.XX+]` to indicate minimum git version. ## Section Index | Section | Focus | |---------|-------| | [History Rewriting](#history-rewriting) | reword, split, replay, rebase | | [Safety Patterns](#safety-patterns) | force-with-lease, reflog, rerere | | [Maintenance & Performance](#maintenance--performance) | geometric repack, commit-graph, fsmonitor | | [Sparse & Partial Operations](#sparse--partial-operations) | sparse-checkout, partial clone, backfill | | [Config-Based Hooks](#config-based-hooks) | declarative hooks in gitconfig | | [Signing & Verification](#signing--verification) | SSH signing, expired key handling | | [Blame & History Investigation](#blame--history-investigation) | blame -C, -L, --diff-algorithm, log -L | | [Diff & Merge Patterns](#diff--merge-patterns) | word-diff, histogram, rerere, merge-conflict recording | | [Worktree & Multi-Branch](#worktree--multi-branch) | worktree, virtual branches | | [Stash Patterns](#stash-patterns) | stash --index, import/export | | [Submodules & Alternatives](#submodules--alternatives) | submodule, subtree, package managers | | [Status & Comparison](#status--comparison) | status.compareBranches, column UI | | [Alias & Config Patterns](#alias--config-patterns) | includeIf, non-ASCII aliases, column.ui | | [Bisect & Debugging](#bisect--debugging) | binary search for regressions | | [HTTP & Remote Patterns](#http--remote-patterns) | 429 retry, prefetch, bundle URIs | | [Deprecation Warnings (Git 3.0)](#deprecation-warnings-git-30) | upcoming breaking changes | --- ## History Rewriting ### `git history` (experimental) [2.54+] Targeted history rewriting without the complexity of interactive rebase. **Reword a commit message** without touching working tree or index: ```bash git history reword <commit> ``` **Split a commit** into two by selecting hunks (uses `add -p` style interface): ```bash git history split <commit> ``` Limitations: No merge commit support. Refuses operations that would cause conflicts. Works in bare repositories. Built on `git replay` machinery. ### `git replay` (experimental) [2.53+] Replay commits onto a new base without touching working tree. Safer than rebase for scripting. ```bash # Replay range onto new base git replay --onto <new-base> <upstream>..<branch> # Revert mode [2.54+] git replay --revert <upstream>..<branch> # Now performs atomic ref updates by default [2.53+] # (instead of printing update-ref commands to stdout) # Drop commits that become empty during replay [2.54+] ``` Can replay down to root commit [2.54+]. ### `git rebase` with trailers [2.54+] ```bash git rebase --trailer "Reviewed-by: A U Thor <author@example.com>" ``` Appends a trailer to every rebased commit via `interpret-trailers` machinery. --- ## Safety Patterns ### `--force-with-lease` **Always prefer** `--force-with-lease` over `--force`. Checks that remote ref hasn't changed since your last fetch before force-pushing. ```bash git push --force-with-lease ``` If someone else pushed to the same branch, the push is rejected. Much safer than blind `--force`. Works by comparing your local remote-tracking ref with the actual remote ref. ### Reflog: Your Safety Net Reflog records every HEAD movement (commit, checkout, merge, reset, rebase). Entirely local — not shared with remotes. ```bash # View reflog with dates git reflog --date=relative # Pretty format git reflog --pretty=format:'%h %gd %gs %ci' # Recover a "lost" commit git checkout <reflog-hash> # or create a branch from it git branch recovered-work <reflog-hash> ```
From kvithayathil/agent-resources, Apache-2.0.
More from kvithayathil/agent-resources
- 0.544score
design-an-interface
mattpocock
Generate multiple radically different interface designs for a module using parallel sub-agents.
SkillAFreshness: AClaude Code +9 - 0.539score
grill-me
mattpocock
Interview the user relentlessly about a plan or design until reaching shared understanding, resolving each branch of the decision tree.
SkillAFreshness: AClaude Code +9 - 0.414score
design-md
kvithayathil
Create, consume, and validate DESIGN.md files — the open format for describing visual identity to coding agents.
SkillDFreshness: DClaude Code +9 - 0.414score
android-layouts
kvithayathil
Android layout best practices for XML/Views and Jetpack Compose.
SkillDFreshness: DClaude Code +9 - 0.410score
provenance-tracking
kvithayathil
Ensures every remote-installed skill has a references/ folder citing its upstream source and can be checked for updates against that source.
SkillDFreshness: DClaude Code +9 - 0.409score
android-data-layer
kvithayathil
Data layer patterns for Android/KMP - data sources, repositories, DTOs, mappers, Room entities, Ktor HttpClient, safe call helpers, token storage, and…
SkillDFreshness: DClaude Code +9 - 0.409score
android-di-koin
kvithayathil
Koin dependency injection setup for Android/KMP - module definitions per layer, ViewModel injection, assembling modules in :app, and koinViewModel() in…
SkillDFreshness: DClaude Code +9 - 0.409score
android-error-handling
kvithayathil
Generic Result wrapper, error types, and extension helpers for Android/KMP - Result<T, E>, DataError, EmptyResult, map, onSuccess, onFailure.
SkillDFreshness: DClaude Code +9 - 0.409score
android-module-structure
kvithayathil
Module layout, dependency rules, and Gradle convention plugins for Android and Kotlin Multiplatform (KMP) projects.
SkillDFreshness: DClaude Code +9 - 0.409score
android-navigation
kvithayathil
Type-safe Compose Navigation for Android/KMP - route objects, feature nav graphs, cross-feature callbacks, and wiring in :app.
SkillDFreshness: DClaude Code +9 - 0.409score
android-presentation-mvi
kvithayathil
MVI presentation layer for Android/KMP - State, Action, Event, ViewModel, Root/Screen composable split, UI models, UiText error mapping, and process death…
SkillDFreshness: DClaude Code +9 - 0.409score
android-testing
kvithayathil
Testing patterns for Android/KMP - ViewModel unit tests with JUnit5, Turbine, AssertK, UnconfinedTestDispatcher, fake repositories, SavedStateHandle, and…
SkillDFreshness: DClaude Code +9
Signals
- Stars
- 0
- Forks
- 0
- Open issues
- 1
- Last commit (this folder)
- Jul 13, 2026 (3 months ago)
From GitHub (fetched Oct 24, 2026).
Details
- Version
- 1.0.0
- License
- Apache-2.0
- Repository
- github.com/kvithayathil/agent-resources
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from kvithayathil
- 0.414score
android-layouts
kvithayathil
Android layout best practices for XML/Views and Jetpack Compose.
SkillDFreshness: DClaude Code +9 - 0.414score
design-md
kvithayathil
Create, consume, and validate DESIGN.md files — the open format for describing visual identity to coding agents.
SkillDFreshness: DClaude Code +9 - 0.410score
provenance-tracking
kvithayathil
Ensures every remote-installed skill has a references/ folder citing its upstream source and can be checked for updates against that source.
SkillDFreshness: DClaude Code +9 - 0.409score
android-testing
kvithayathil
Testing patterns for Android/KMP - ViewModel unit tests with JUnit5, Turbine, AssertK, UnconfinedTestDispatcher, fake repositories, SavedStateHandle, and…
SkillDFreshness: DClaude Code +9 - 0.409score
android-data-layer
kvithayathil
Data layer patterns for Android/KMP - data sources, repositories, DTOs, mappers, Room entities, Ktor HttpClient, safe call helpers, token storage, and…
SkillDFreshness: DClaude Code +9 - 0.409score
android-di-koin
kvithayathil
Koin dependency injection setup for Android/KMP - module definitions per layer, ViewModel injection, assembling modules in :app, and koinViewModel() in…
SkillDFreshness: DClaude Code +9
Cite this page
modern-git-patterns skill. Agent Mart. https://agentmart.dev/skills/kvithayathil-modern-git-patterns (last updated 2026-10-24)