diff options
author | Christopher Baines <mail@cbaines.net> | 2018-05-13 20:01:30 +0100 |
---|---|---|
committer | Christopher Baines <mail@cbaines.net> | 2018-05-13 21:09:53 +0100 |
commit | d45a8b42ca8c8d1c32ea0c353ff672a60f061b67 (patch) | |
tree | 619429547d6de5f4bcb4417f936bc0eb16044351 | |
parent | 94c6e24da1cd28abc81ac7ed337de9ed3bb39201 (diff) | |
download | magit-tutorial-d45a8b42ca8c8d1c32ea0c353ff672a60f061b67.tar magit-tutorial-d45a8b42ca8c8d1c32ea0c353ff672a60f061b67.tar.gz |
Add headings to break up the Splitting section
-rw-r--r-- | README.org | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -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 |