aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Baines <mail@cbaines.net>2018-05-13 20:01:30 +0100
committerChristopher Baines <mail@cbaines.net>2018-05-13 21:09:53 +0100
commitd45a8b42ca8c8d1c32ea0c353ff672a60f061b67 (patch)
tree619429547d6de5f4bcb4417f936bc0eb16044351
parent94c6e24da1cd28abc81ac7ed337de9ed3bb39201 (diff)
downloadmagit-tutorial-d45a8b42ca8c8d1c32ea0c353ff672a60f061b67.tar
magit-tutorial-d45a8b42ca8c8d1c32ea0c353ff672a60f061b67.tar.gz
Add headings to break up the Splitting section
-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