git warp — Manual

What is git warp?

git warp is a local web app for interactively rewriting your git history, and it includes a full undo/redo stack. It lets you reorder, squash, fixup, and reword commits through a drag-and-drop interface in the browser.

It is intended for keeping feature branches tidy. All operations affect only the current local branch — nothing is pushed to the remote. If the rewritten parts of a branch have been pushed to a remote before the history rewrite, it can be force pushed to the remote, but this is not recommended if other people are working on the same branch.

All changes are applied to the repo immediately and all changes can be undone:

Requirements

Installation

pip install git-warp

This installs the git-warp program, which git automatically exposes as the git warp subcommand. Run git warp to verify it is on your PATH.

Starting the app

Run from inside any git repository:

git warp [--port <N>] [--clear-log] [--dark | --light] [--undo [N] | --redo [N]]

The default browser opens with the git warp tab. If you want to use another browser (e.g. inside your IDE) copy the URL from the terminal.

Uncommitted changes

Reorder, squash, fixup, reword, reset, and branch create/delete are all blocked when the working tree has uncommitted changes. Use Stash to set them aside, perform your operations, then Stash Pop to restore them.

Toolbar

Branch — a dropdown showing the current branch. Select a different local branch to switch to it. Blocked when there are uncommitted changes or a rebase is in progress.

Squash — appears when two or more commits are selected. Combines them into one commit; the message is the combined messages of all selected commits.

Stash — appears when there are uncommitted changes. Runs git stash push, clearing the working tree so rebase operations can proceed.

Stash Pop — appears when a stash exists. Runs git stash pop, restoring the previously stashed changes. Requires a clean working tree.

Refresh — reloads the commit list and Undo Stack from the repository. The list also refreshes automatically when you switch back to the browser tab, so you rarely need this button.

Quit (×) — stops the git warp server and attempts to close the tab. Closing the browser tab without clicking Quit does not stop the server; it can still be stopped with Ctrl+C in the terminal.

Commit History

Shows commits on your current branch, newest first. All commits that have been pushed to the remote have a ☁ icon — rewriting it will require a force push.

Click a commit to view its message, author, date, and diff in the pane at the bottom; drag the divider above it to resize. A banner above the list warns about a dirty working tree, a detached HEAD, a rebase in progress, or an existing stash. If a rebase produces a merge conflict, a dialog appears. Resolve the conflict in your editor, then click Continue — or click Cancel to abort and return to the original state.

Tip: drag related commits together first, then squash or fixup.

Undo Stack

An undo stack for the current branch which is sorted chronologically

The Undo Stack is sorted chronologically and also shows changes made by external tools. Pull and rebasing are single Undo Stack entries, even if it affects multiple commits.

The Undo Stack entries are kept as long as git's reflog retention settings allow (configured by gc.reflogExpireUnreachable, default 30 days for unreachable commits).

Tip: a failed rebase can always be recovered with git rebase --abort in the terminal.

Submodules

Moving commits that touch .gitmodules is blocked — reordering such commits can corrupt submodule references and must be done manually.

Resetting to an Undo Stack entry is blocked when the target has a different .gitmodules file. If the reset succeeds but changes submodule commit pointers, a modal confirm appears offering to run git submodule update --init.