This article was originally published on bmf-tech.com.
Overview
A note on the steps to split a commit.
Steps
# Specify where you want to split and rebase. Set the target commit to edit.
git rebase -i HEAD~5
# Unstage
git rebase HEAD~
# Recommit the unstaged changes at the desired granularity.
git add & git commit
# Once the commit is complete, continue the rebase
git rebase --continue
# Check the log
git log
# Force push
git push -f origin HEAD
This should allow you to split the commit.
Top comments (0)