logo
Kurashizu Blogwhere ideas flow
  • Home
  • News
  • Blog
  • About
  • Home
  • News
  • Blog
  • About

© 2026 Kurashizu. All rights reserved.

Admin·New Post·Service Status
Powered by Cloudflare·31.10.26
← Back to news

Splitting a Git Commit

Original article
blog.gnoack.org|66 points|32 comments|by signa11|Aug 15, 2026

Dividing a Git Commit

Published: 2026-08-12

The process of splitting a git commit has become remarkably straightforward. Instead of wrestling with complex rebase sequences, you can now simply utilize the following command:

git history split ${REF}

The Workflow

The operation follows a logical progression where one large commit is decomposed into two smaller ones: Commitoriginal→Commit1+Commit2\text{Commit}_{\text{original}} \rightarrow \text{Commit}_{1} + \text{Commit}_{2}Commitoriginal​→Commit1​+Commit2​

The step-by-step process is as follows:

  • The system prompts you hunk by hunk to select the specific changes to include in the initial commit.
  • An editor opens to allow you to write the message for the first commit.
  • An editor opens again for the second commit's message.

It truly couldn't be more intuitive.

Visualizing the Split

Implementation Example

To execute this, run the command in your terminal:

git history split HEAD~1

Git Split Illustration


A Note on Community Knowledge

P.S. If you look at Stack Overflow, the primary discussion on splitting commits still promotes the old and cumbersome approach.

There is a stark contrast between the popularity of an answer and its actual utility, as shown below:

Answer RankApproachUpvotesStatus
Top AnswerComplex/Manual2,656Outdated
20th AnswerThe Correct Way2Underappreciated

It is a shame that the most efficient method remains largely ignored in favor of the legacy workflow.