Skip to content

blipinsk/git-split-commit

Repository files navigation

git-split-commit

A bash script that splits a git commit into multiple commits, one for each modified file.

Check out my blog :shipit: or say hi on Twitter.

How does it work?

how_it_works

Installation

  1. Clone the repo
  2. (optional) Install git alias
./install-git-alias.sh

Although the second step is optional, it is strongly advised. You can use the script directly without installing the git alias, but git alias makes it much better.

Usage

To split a Git commit, run the git alias for the script with the hash of the commit to split as the only argument:

Usage: git split-commit <commit_hash> [options]
Options:
  --no-push, -np              Skips the offer to **force** push the original branch
  --keep-temp-branch, -ktb    Retains the temporary branch used to split the commit
  --version, -v               Prints the version of the script
  --help, -h                  Prints this usage message

Example

example

Developed by

  • Bartek Lipinski

License

Copyright 2023 Bartosz Lipiński

This script is licensed under the Mozilla Public License 2.0.

About

↔ A bash script which splits a git commit into multiple commits, one for each modified file.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages