#git-commit #git #git-tool #interactive #command #cli-tool #break

app git-break-commits

git-break-commits is an interactive Command Line Interface (CLI) tool that helps break existing Git commits and reorganize them into new commits

3 releases

0.1.2 Jan 24, 2024
0.1.1 Jan 17, 2024
0.1.0 Jan 17, 2024

#2229 in Command line utilities

Download history 11/week @ 2024-01-17 5/week @ 2024-01-24 2/week @ 2024-02-14 20/week @ 2024-02-21 25/week @ 2024-02-28 1/week @ 2024-03-06 5/week @ 2024-03-13 21/week @ 2024-03-27 45/week @ 2024-04-03

71 downloads per month

MIT license

4.5MB
1K SLoC

git-break-commits

git-break-commits is an interactive Command Line Interface (CLI) tool that helps break existing Git commits and reorganize them into new commits. Please refer to the following video to see how it works!

Watch Demo Video

Installation

1. Installing from crates.io:

Since git-break-commits is built with Rust, you need to install Rust first if it is not already on your system.

# Install Rust
$ curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

# Configure `PATH`
$ export PATH="$HOME/.cargo/bin:$PATH"

Then, please use cargo install command such as

cargo install git-break-commits

2. Installing from the source

Clone this repository and install git-break-commits.

# Clone this repository
$ git clone https://github.com/vinnamkim/git-break-commits.git

# Install `git-break-commits`
$ cargo install --path git-break-commits

2. Installing from the pre-built binary

It is not supported yet.

Usage

To use git-break-commits, run the following command in your terminal:

git-break-commits <depth>  # Default <depth> is 1

This command will display the changes between HEAD~<depth> and HEAD in a CLI file navigator. You can navigate it to select changes for a new commit. The new commit will be stacked on top of HEAD~<depth> after breaking all commits between HEAD~<depth> and HEAD. Please refer to the following key mappings in this step:

  • ↑: Move the cursor up
  • ↓: Move the cursor down
  • ←: Go to the parent directory
  • →: Go to the subdirectory
  • Space: Select or unselect a file/directory
  • Enter: Save the current selection and go to write the commit message
  • q or Ctrl + c: Quit without making any changes
  • h: Open the help pop-up message

You should repeat this process until all changes between HEAD~<depth> and HEAD are resolved. We believe that your commit history will be cleaner than before with this minimal effort!

License

This software is licensed under the MIT License.

Dependencies

~12–25MB
~340K SLoC