Skip to content

Commit

Permalink
Make 'Splitting a Commit' paragraph 2 more clear.
Browse files Browse the repository at this point in the history
The first sentence in paragraph 2 of 'Splitting a Commit' did not
make much sense in the context of the rest of the paragraph. This
commit removes it and integrates the useful bits into a later point
where they flow more sensibly.
  • Loading branch information
wcarss committed Feb 1, 2013
1 parent 8037e23 commit a96c65b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion en/06-git-tools/01-chapter6.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -669,7 +669,7 @@ Splitting a commit undoes a commit and then partially stages and commits as many
edit 310154e updated README formatting and added blame
pick a5f4a0d added cat-file

Then, when the script drops you to the command line, you reset that commit, take the changes that have been reset, and create multiple commits out of them. When you save and exit the editor, Git rewinds to the parent of the first commit in your list, applies the first commit (`f7f3f6d`), applies the second (`310154e`), and drops you to the console. There, you can do a mixed reset of that commit with `git reset HEAD^`, which effectively undoes that commit and leaves the modified files unstaged. Now you can stage and commit files until you have several commits, and run `git rebase --continue` when you’re done:
When you save and exit the editor, Git rewinds to the parent of the first commit in your list, applies the first commit (`f7f3f6d`), applies the second (`310154e`), and drops you to the console. There, you can do a mixed reset of that commit with `git reset HEAD^`, which effectively undoes that commit and leaves the modified files unstaged. Now you can take the changes that have been reset, and create multiple commits out of them. Simply stage and commit files until you have several commits, and run `git rebase --continue` when you’re done:

$ git reset HEAD^
$ git add README
Expand Down

0 comments on commit a96c65b

Please sign in to comment.