Skip to content

Git custom command to split a commit based on different files

Notifications You must be signed in to change notification settings

nikayou/git-split-commit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

git-split-commit

Git custom command to split a commit based on different files

Install

  • Download git-split-commit file
  • ensure it is executable with chmod +x
  • add it in your PATH

Usage

git split-commit <commit-id>

Effect

Given a commit <commit-id> affecting N files, will split the commit with interactive rebase into N different commitq: one for each file. It will conserve the commit message (though, it appends the operation and the affected file).

18451295 add A
16400912 add B
77421832 add C, modify A, delete B
81726489 add D

When performing git split-commit 77421832, you will have

18451295 add A
16400912 add B
48151623 add C, modify A, delete B -> A C
33254245 add C, modify A, delete B -> M A
61414522 add C, modify A, delete B -> D B
81726489 add D

About

Git custom command to split a commit based on different files

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages