Git and version control
Commits, branches, merges, pull request descriptions and history.
Download all 88
Start here 1
The general, start-from-zero entry for a need in this category: it works from a blank start, asks for what it needs and hands off to the specific entries. Example: Plan a trip.
- Fix a git problem
Works out what state your repository is in and gives the safest commands to get where you want, with a backup first and a check after. Use when git confuses you or you are stuck mid-task.
Specific 75
One situation, audience, tool or format inside the category. Example: Plan a road trip with children.
- Write a commit message
Writes a commit message that states what changed and why, in the repo's own convention, and flags staged changes that should be split. Use before committing.
- Conventional Commits rules
Makes the assistant write every commit in Conventional Commits 1.0.0 format, one logical change per commit, with honest breaking-change footers. Use in repos that release from commits.
- Write a pull request description
Writes a pull request description that tells reviewers why the change exists, what to look at first, how to test it and what could break. Use when opening a PR.
- Recover lost Git work
Recovers commits, branches, stashes and staged files lost to a reset, rebase or dropped stash, using reflog and fsck after a backup, explaining each command. Use right after a git mistake.
- Resolve a merge conflict
Resolves merge, rebase or cherry-pick conflicts by reading both sides and their common base, keeps the intent of each, and asks when the intents contradict. Use when git stops on a conflict.
- Choose a branching strategy
Recommends a branching and release strategy such as trunk-based, GitHub flow or release branches for a team's size, cadence and environments, with rules, protections and migration steps.
- Git safety rules
Standing rules for an assistant or coding agent running git, with no force-push to shared branches, no rewriting published history, backups before rebase or reset, no secrets, and asking before push.
- Clean up a branch's commit history
Plans an interactive rebase that turns a messy branch into logical, reviewable commits, with a backup, the exact todo list and a check that the code is unchanged. Use before merging a WIP branch.
- Write a pull request template
Writes a short pull request template for a repository, with only the prompts reviewers actually need, a checklist tied to real project risks, and variants for different change types if useful.
- Explain a git error
Explains a git error or confusing state such as detached HEAD, rejected push or divergent branches in plain words, what caused it and the safest command to get out. Use when git stops you.
- Fix git authentication failures
Diagnoses failing clone, pull or push authentication over HTTPS or SSH, covering expired tokens, stale credential helpers, SSO authorization, wrong SSH keys and the wrong remote URL.
- Write a .gitignore file
Writes a commented .gitignore for a stack and toolchain, keeps personal editor files in a global excludes file, never ignores lockfiles, and shows how to untrack files already committed.
- Write a CODEOWNERS file
Writes a CODEOWNERS file from the repository layout and team structure, with ordered ownership rules, fallbacks, protection for sensitive paths and a check for files nobody owns.
- Choose the right git undo
Works out exactly what needs undoing and whether it is shared, then gives the one right command among restore, revert, reset, amend and cherry-pick, with its effect and a check. Use mid-mistake.
- Configure branch protection
Designs branch protection or rulesets covering required checks, reviews, CODEOWNERS, linear history, signing, bypass, tag protection and merge queue, fitted to team size and release model.
- Fix line-ending churn
Diagnoses whole-file diffs caused by CRLF and LF, file mode or encoding differences across operating systems, then writes a .gitattributes, a one-time renormalise commit and per-machine settings.
- Version control specialist
Git expert for any version-control problem, history surgery or team workflow question, who inspects state first and gives exact, safe commands with a way back.
- Split a large pull request into a stack
Splits a large pull request into a stack of small, independently reviewable PRs with their order, dependencies and the branch commands to build them. Use when a PR is too big to review well.
- Purge a file from git history
Removes a large file or committed secret from all git history with git filter-repo, with a backup first, exact commands, force-push coordination and what every collaborator must do.
- Automate pull request housekeeping
Sets up auto-labelling, reviewer assignment, size labels, stale handling and auto-merge for pull requests using the host's built-in features first and minimal, safe CI jobs second.
- Coach git for non-developers
Teaches writers, designers and researchers the minimum git needed to contribute to a docs or content repo through a web editor, desktop app or terminal, one concept per turn with a small exercise.
- Fix Git LFS problems
Fixes Git LFS trouble such as pointer files checked out as text, missing objects, smudge errors, quota limits, and files wrongly in or out of LFS, without losing content.
- Fix git submodule problems
Fixes submodules that are empty, detached, out of sync with the recorded commit, failing in CI, pointing at a lost commit or needing clean removal, with the exact commands.
- Investigate why code changed
Investigates when and why a piece of code changed using blame, log search, pickaxe and linked pull requests, and writes a short evidence-backed history of the decision and who to ask.
- Manage dotfiles with git
Puts personal shell, editor and tool configuration under git using a bare repository, GNU Stow or chezmoi, with per-machine differences, secrets kept out and a one-command setup on a new machine.
- Move commits between repositories
Carries commits or a patch between repositories that share no history, using format-patch, am and apply with three-way fallback, and fixes patches that fail to apply because paths or code differ.
- Reduce recurring merge conflicts
Finds which files keep conflicting from repository history and removes the causes, such as shared registries, unsorted lists, formatter drift and long-lived branches.
- Resolve clashing database migrations
Fixes database migrations from two branches that clash in order or numbering in Django, Rails, Alembic, Prisma, Flyway, Liquibase or EF Core, by merging or renumbering them safely.
- Set up commit signing
Sets up commit and tag signing with SSH or GPG keys step by step, with hosting-side verification, CI bot signing, and how a signature differs from a DCO sign-off. Use when signing is required.
- Set up Git LFS
Sets up Git Large File Storage for a repository with tracking patterns, optional migration of existing large files, CI and clone settings, and storage and bandwidth quota considerations.
- Check a git command before running it
Explains what a git command copied from the internet or an AI will do to this repository, what it could destroy, and a safer equivalent with a backup. Use before running it.
- Fix a push blocked by a large file
Fixes a push rejected by the host's file size limit by removing the file from the local unpushed commits only, then moving it to Git LFS, external storage or the ignore list.
- Open your first pull request to a project
Walks a developer through a first contribution to someone else's repository, from reading the contributing guide through fork, branch, commits, sign-off, pull request and updates after review.
- Set up a git diff and merge tool
Configures a visual diff and merge tool for git, such as VS Code, IntelliJ, Beyond Compare, Meld or vimdiff, with zdiff3 conflict style, word diff and a tested conflict.
- Summarize my git activity for a period
Turns your own commits and pull requests across repositories for a period into a short summary of what you shipped, for a standup, timesheet, weekly update or performance review.
- Link commits and branches to tickets
Links commits, branches and pull requests to Jira, Linear or similar tickets with a branch naming rule, a prepare-commit-msg hook that adds the id, and a CI check with an escape hatch.
- Audit who can access your repositories
Reviews who and what can reach an organisation's repositories (owners, members, outside collaborators, teams, deploy keys, apps, tokens, webhooks) and produces a ranked clean-up plan.
- Back up an organisation's git repositories
Sets up scheduled backups of an organisation's repositories on a code host, including LFS objects, wikis, issues and pull request data, with retention, monitoring and a tested restore.
- Backport a fix to release branches
Plans backporting a fix to maintained release branches with cherry-pick -x, conflict handling where code has diverged, per-branch tests, version bumps and changelog entries. Use for patch releases.
- Check which releases contain a fix
Answers whether a fix is in a given branch or release, including squash-merged and cherry-picked copies with new hashes, using tag --contains, cherry markers and patch-id.
- Choose a git hosting platform
Compares GitHub, GitLab, Bitbucket, Azure DevOps and self-hosted options against a team's needs for CI, compliance, data location, integrations, cost and migration effort, and recommends one.
- Clean up stale branches safely
Sorts a repository's remote and local branches into merged, abandoned, active and protected, archives unmerged work as tags before deleting, and sets a policy so branches stop piling up.
- Fix a failing DCO sign-off check
Adds missing Signed-off-by lines to a pull request's commits so the DCO check passes, keeping authorship, co-authors and commit signatures intact and never signing for others.
- Fix a mistaken release tag
Fixes a wrong, misplaced or premature release tag, deciding between moving it and cutting a new version based on who already fetched it, with registry, cache and CI effects.
- Move files keeping git history
Moves, renames or splits files so git log --follow and blame keep working, with rename-only commits, similarity checks and a copy-based trick for splitting one file into several.
- Rename a repository's default branch
Plans renaming a default branch such as master to main, covering the hosting settings, branch protection, CI, deploy triggers, scripts, open pull requests and every clone, with a checklist for after.
- Repair a corrupted git repository
Recovers a repository with corrupt or missing objects, broken refs, a stuck index.lock or damage from cloud-sync folders, backing up the whole folder and saving uncommitted work first.
- Resolve a lockfile merge conflict
Resolves conflicts in package-lock, yarn.lock, pnpm-lock, poetry.lock, Cargo.lock, Gemfile.lock and similar files by merging the manifests and regenerating the lockfile, then checks resolved versions.
- Resolve a Jupyter notebook merge conflict
Resolves Jupyter notebook merge conflicts cell by cell with nbdime instead of editing raw JSON, then sets up output stripping and notebook-aware diffs so conflicts stop happening.
- Resolve an Xcode project file conflict
Resolves merge conflicts in an Xcode project.pbxproj file without corrupting it, checks the project still opens and builds, and sets up practices that stop these conflicts from recurring.
Showing 50 of 75. See them all in search
Advanced 12
Expert or deep work that assumes the user can judge expert output. Example: Plan croissant lamination.
- Rebase stacked branches
Plans updating a stack of dependent branches after the base moves or a lower PR is squash-merged, using rebase --onto or --update-refs, with commands per branch, conflict expectations and backups.
- Land a repository-wide reformat
Lands a repository-wide reformat or codemod without wrecking open branches, with a freeze window, an update recipe for open branches and a .git-blame-ignore-revs entry.
- Convert an SVN, TFVC, Mercurial or Perforce repository to git
Plans and runs a conversion from SVN, TFVC, Mercurial or Perforce to git, keeping history, mapped authors, branches and tags, and moving large binaries to LFS.
- Extract a folder into a new repository
Plans moving one directory such as a library or service into its own repository with its history, using git filter-repo, then rewires CI, package names, issues and references in the original repo.
- Maintain a patched copy of a dependency
Sets up a patched third-party dependency (patch file, git fork with rebased patches, or vendored copy) so it stays easy to update, review and send upstream.
- Move repositories to a new git host
Plans and checks a move of repositories between GitHub, GitLab, Bitbucket or Azure DevOps, keeping history, tags, LFS objects, issues, pull requests, wikis and every reference to the old URLs.
- Open the same change across many repositories
Applies one change (a config update, workflow fix or dependency bump) across many repositories, opens a pull request in each, and tracks which merged, failed or were skipped.
- Recover a shared branch after a bad force-push
Restores a shared branch after someone force-pushed over other people's commits, finding the lost tip from reflogs, teammates' clones or the hosting service, and coordinating the fix with the team.
- Revert a feature spread over many commits
Backs out a feature whose commits are scattered among other work on a shared branch, as one reviewable revert, after checking for later changes that depend on it.
- Find code hotspots from git history
Mines git history for files that change most, files that change together and areas known by one person, weighs them by size or complexity, and ranks where refactoring or knowledge sharing pays off.
- Start a repository with fresh history
Replaces a repository's long or messy history with a single new root commit while keeping the old history archived and reachable, with a coordinated cutover for every clone.
- Speed up git in a large repository
Diagnoses slow clone, fetch, status or checkout in a large repository and applies the matching fixes, such as partial clone, sparse checkout, fsmonitor, commit-graph and scheduled maintenance.
Not: reviewing a PR's code (code-review).