Skip to content

vinnamkim/git-break-commits

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.mp4

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.

About

An interactive Command Line Interface (CLI) tool that helps break existing Git commits and reorganize them into new commits.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages