diff --git a/2019/2019-09-24_advancedGitTraining/slides/rebase.md b/2019/2019-09-24_advancedGitTraining/slides/rebase.md index 7e8e9c1e050b7830afa86f458fb8029d5fb3bd5d..e7d96f5a430ce5ea87d4ea428ccb60e01f676b14 100644 --- a/2019/2019-09-24_advancedGitTraining/slides/rebase.md +++ b/2019/2019-09-24_advancedGitTraining/slides/rebase.md @@ -86,7 +86,7 @@ git rebase -i <branch> -# Example (1) +# Example 1: Reword and fixup (1) * Create and switch to your own branch * Add and commit two files to this branch: @@ -107,7 +107,7 @@ Now, we want to: -# Example (2) +# Example 1: Reword and fixup (2) Perform an interactive rebase with the two last commits: @@ -141,12 +141,12 @@ $ git push origin myBranch -f -# Practical: Git Interactive Rebasing +# Example 2: Pick and squash (2) -* If you wanted to keep both commit messages in one commit, instead change the prompts to squashing instead +* If you wante to keep both commit messages in one commit, change the action to `squash` ```bash -$ pick 1234567 add Micheal to attendee list -$ squash abcdef0 add Kevin to attendee list +$ pick 1234567 add william to attendee list +$ squash abcdef0 add roberta to attendee list ``` -* This will create a commit with both files still in, but the commit message of that commit will be the two commit messages of the two files combined. \ No newline at end of file +* This will create a commit with both modified files, with the commit message being a combination of the two commit messages. \ No newline at end of file