Skip to main content

AI-powered git assistant for when git is being git

Project description

git-wtf

Both branches were doing something specific. git wtf merge reads what each was trying to do, keeps both, and explains every change — before writing a single file.

git wtf merge resolving a 2-file, 4-hunk conflict


install

macOS

brew install git-wtf/tap/git-wtf

Any OS

pipx install git-wtf

First time using pipx? Run pipx ensurepath and restart your terminal. Git picks up git-wtf automatically as a subcommand — no aliases required.

Then configure your LLM provider (30 seconds):

git wtf setup

API keys, proxy config, env vars → SETUP.md

Don't have a merge conflict handy? Run git wtf --demo.


what it does

git wtf merge

When two branches both modified the same code, git sees a text conflict. git wtf merge goes deeper — it reads the commit history on each side, extracts all three blob versions of every conflicted file, and asks the LLM: what was each branch actually trying to accomplish?

Then it writes a resolution that keeps both features intact.

Before touching disk it shows you:

  • Per-file panels — what the file does now, a confidence rating (HIGH / MEDIUM / LOW), and a callout for anything it wasn't sure about
  • A plain-English summary — what the app will do after this merge, what trade-offs were made
  • One promptapply this merge? [Y/n]

Nothing is written until you say Y.

git wtf

Diagnoses whatever state your repo is in — detached HEAD, mid-merge, diverged from remote, unresolved conflicts. Reads the git state, figures out what happened, tells you exactly what to run.


how it works

  • Parses conflict markers and extracts all three blob versions (ancestor, yours, theirs) with full file context
  • Reads project context — README.md, package.json, CLAUDE.md / .cursorrules — so the LLM knows what you're building
  • One LLM call per conflicted file, sent with both branches' full commit histories
  • A second call synthesises a plain-English "what this merge will do" summary
  • Shows everything, asks once, then writes and git adds

what it doesn't do (yet)

  • Rebase conflict resolution
  • Multi-file semantic understanding (e.g. a type changed in one file and needs updating in five others)
  • Auto-commit after merge

license

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

git_wtf-0.1.1.tar.gz (21.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

git_wtf-0.1.1-py3-none-any.whl (28.0 kB view details)

Uploaded Python 3

File details

Details for the file git_wtf-0.1.1.tar.gz.

File metadata

  • Download URL: git_wtf-0.1.1.tar.gz
  • Upload date:
  • Size: 21.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for git_wtf-0.1.1.tar.gz
Algorithm Hash digest
SHA256 1554bbf49292a4416d74dd1120570f0c4bdd6089c31508a71953fca15311fd37
MD5 6ebdad4e1ade3acc3061d760343c4818
BLAKE2b-256 5338553d4d3e15b69d2444227fcc5ac4da2a61bbdd257ad52afab2a3648cc2a7

See more details on using hashes here.

Provenance

The following attestation bundles were made for git_wtf-0.1.1.tar.gz:

Publisher: publish.yml on prod-ric/git_wtf

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file git_wtf-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: git_wtf-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 28.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for git_wtf-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 2671642850f97de727b00503e3dd7ed3832827cd138d9c4a470f68b3ec2a8178
MD5 666f520dfe101b741908b9d7785ea6b7
BLAKE2b-256 65bb9c78ae3c95361d53b62f6d7d2b4072e657ff941edc326f77869b31814484

See more details on using hashes here.

Provenance

The following attestation bundles were made for git_wtf-0.1.1-py3-none-any.whl:

Publisher: publish.yml on prod-ric/git_wtf

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page