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+https://github.com/HelgesenSoftware/git-warp

After installation, the git-warp command is available in your terminal. If it is not found, your Python scripts directory may not be on your PATH. Find the location with:

python -m site --user-scripts

Add that directory to your PATH, or run the tool directly with:

python -m git_warp

Starting the app

Run from inside any git repository:

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

The browser opens automatically. The terminal shows the URL and port.

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.

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 your local branch. Each entry is a unique state of the branch tip, recorded chronologically from when the branch was created.

The Undo Stack reflects all local changes — commits, rebases, resets — whether made inside or outside git-warp. When you pull or rebase from the remote, the update appears as a single entry.

Note: the Undo Stack is kept as long as git's reflog retention settings allow (configured by gc.reflogExpireUnreachable, typically 30 days). Once commits are no longer reachable from the branch, they may be garbage collected and their entries will expire.

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.