aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.org8
1 files changed, 8 insertions, 0 deletions
diff --git a/README.org b/README.org
index ed94db7..8b84361 100644
--- a/README.org
+++ b/README.org
@@ -214,6 +214,8 @@ now this is the only one needed.
To split a commit, you can combine Magit's ability to revert portions
of a commit with an interactive rebase.
+** Preparation
+
First, lets create a single commit to split. Add some text to both of
the following example blocks.
@@ -227,6 +229,8 @@ the following example blocks.
Then commit the additions as a single commit.
+** Starting the interactive rebase
+
As the commit needing splitting is the most recent, it's not necessary
to rebase to edit the right commit, however, in general, you may need
to interactively rebase, and choose to edit the commit you intend to
@@ -238,6 +242,8 @@ edit the most recent commit.
Once you've begun the rebase, in the status window, select the commit
to split and press =RET= (Enter) to show the full details.
+** The actual splitting
+
To split the contents of the commit, we are going to remove some parts
from it. To do that, we can revert those parts, stage that change,
then revert the staged changes. Once the staged changes have been
@@ -261,6 +267,8 @@ done, stage the unstaged changes, and commit them. When you're
finished committing the unstaged changes, continue the rebase to
finish.
+** Splitting one commit in to more than two commits
+
If you wish to split one commit in to more than two commits, then you
can repeat the above process again once finished, or revert all the
parts you wish to split out, and then stage and commit the appropriate