package git-split

  1. Overview
  2. Docs
A tool to split a git commit into multiple

Install

Dune Dependency

Authors

Maintainers

Sources

0.0.4.tar.gz
md5=457ad254b4c76aed9da5d979befb3897
sha512=2e28abbb4c27af1fa9b3c447d81680efc4c5fb70ee16843415f26eb83e4eb5b16d4bc24aca0f24a13a8180a8a8f44fc8fa4138b621630abd71dc62f8d5d35537

README.md.html

git split

TUI-based commit splitting tool for git.

Why?

For those of us who like keeping their commit history clean, sometimes it may happen that a single commit ends up containing more functionality than we'd like. For these cases the main solution is to do a soft reset on the commit and start using git add -p to pick what you want in your commit, leaving the rest for another commit. That tool operates mostly on a hunk-by-hunk basis and when you'd like to go for line-by-line adding, the UX gets pretty bad, which led me to build this.

How?

This tool works by parsing the diff of the commit you are trying to split and re-assembling a diff after confirming the lines you want to keep.

Another option would have been to keep an internal "set" of changes and assemble the diffs in memory until the unbound changeset is empty, but I deemed that to be overall a worse UX.

Demo

NB!

The goal of this project was to learn OCaml, so if you are an OCaml expert reading this and despairing at the code quality, feel free to open a discussion with improvement suggestions.

OCaml

Innovation. Community. Security.