aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Baines <mail@cbaines.net>2018-05-13 20:18:50 +0100
committerChristopher Baines <mail@cbaines.net>2018-05-13 21:09:53 +0100
commit306d91cc62dca84970e391ff909e96672710cd75 (patch)
treefde0035cc21dc5b48a8653cc06fe08b6b53f2d28
parentd45a8b42ca8c8d1c32ea0c353ff672a60f061b67 (diff)
downloadmagit-tutorial-306d91cc62dca84970e391ff909e96672710cd75.tar
magit-tutorial-306d91cc62dca84970e391ff909e96672710cd75.tar.gz
Fill out the section on interactive rebasing
-rw-r--r--README.org33
1 files changed, 33 insertions, 0 deletions
diff --git a/README.org b/README.org
index 8b84361..396c3cb 100644
--- a/README.org
+++ b/README.org
@@ -209,6 +209,39 @@ now this is the only one needed.
* Interactive rebasing
+Interactive rebasing is very powerful, but can be quite tricky. Magit
+can help with setting up an interactive rebase as well as providing
+context and information while it's underway.
+
+** Preparation
+
+Enter some text in the following two example sections. Commit the
+change to the first section in one commit, and then the second section
+in a second commit.
+
+#+BEGIN_EXAMPLE
+
+#+END_EXAMPLE
+
+#+BEGIN_EXAMPLE
+
+#+END_EXAMPLE
+
+The interactive rebase we'll try will reverse the order of these
+commits.
+
+** Starting the interactive rebase
+
+From the Magit status window, press =r= then =i= to select the
+starting point for the interactive rebase. Move down (using =C-n=) to
+the first of the commits you just created, and press =C-c C-c= to
+start the interactive rebase.
+
+This will open a buffer for inputting the operations, you should see
+the supported operations at the bottom of the buffer. In this case,
+use the =M-n= and =M-p= to reverse the order of the commits. Press
+=C-c C-c= to finish the interactive rebase.
+
* Splitting commits
To split a commit, you can combine Magit's ability to revert portions