diff options
author | Christopher Baines <mail@cbaines.net> | 2018-05-13 19:38:59 +0100 |
---|---|---|
committer | Christopher Baines <mail@cbaines.net> | 2018-05-13 21:09:53 +0100 |
commit | 7c862fd15a66dd3818c3e5b28c248a9de21f3068 (patch) | |
tree | bff53d7c00e50a12dac902b106c46132312519b4 | |
parent | 0126aa2af17af50d0cbfbc7ba6eb70bd974e295b (diff) | |
download | magit-tutorial-7c862fd15a66dd3818c3e5b28c248a9de21f3068.tar magit-tutorial-7c862fd15a66dd3818c3e5b28c248a9de21f3068.tar.gz |
Add a section on Resetting
-rw-r--r-- | README.org | 21 |
1 files changed, 21 insertions, 0 deletions
@@ -176,6 +176,27 @@ should say you're ahead of the upstream branch by one commit. Press =P= and then =u= as before to push this new commit. As Git has remembered the upstream branch, you won't need to select it manually. +* Resetting + +** Soft reset + +There are multiple different types of reset actions, one is a soft +reset, this is the default in Magit. + +Press =x= then type =HEAD^= to discard the commit created in the +previous section. Note that a soft reset retains the actual changes +within the commit. + +** Hard reset + +A hard reset will discard both the changes, and the commit. Press =X= +to get the list of reset options, then =h= to select a hard +reset. Enter =test/test-branch= when prompted where to reset to. This +action will have undone the previous reset. + +Perform another hard reset, this time to =HEAD^= like the soft reset, +to get the repository ready for [[*Pulling][Pulling]]. + * Pulling * Interactive rebasing |