From 978e48496734b3bba847e9081e96bca399d84775 Mon Sep 17 00:00:00 2001 From: Cameron Drake Date: Tue, 29 Jul 2014 11:53:00 -0700 Subject: [PATCH] Update README.md --- README.md | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 1ec8479..c33ebd6 100644 --- a/README.md +++ b/README.md @@ -109,6 +109,15 @@ If everything is successful, you should see something like this: ``` (master)$ Successfully rebased and updated refs/heads/master. ``` +### Possible issues with merging +Safe merging strategy: +```sh +(master)$ git merge --no-ff --no-commit featurebranch +``` +#### I need to merge a branch into a single commit +```sh +(master)$ git merge --squash featurebranch +``` ### Possible issues with interactive rebases @@ -153,6 +162,11 @@ some code You will need to resolve the differences between the code that was added in your new commit (in the example, everything from the middle line to `new-commit`) and your `HEAD`. +Sometimes these merges are complicated and you should use a visual diff editor: +```sh +(master*)$ git mergetool -t opendiff +``` + After you have resolved all conflicts and tested your code, `git add` the files you have changed, and then continue the rebase with `git rebase --continue` ``` @@ -267,4 +281,3 @@ And finally, let's cherry-pick the commit for bug #14: ``` (14)$ git cherry-pick 5ea5173 ``` -