+</li>\r
+<li>\r
+<p>\r
+After working in a wrong branch, switching to the correct\r
+branch you would want to is done with:\r
+</p>\r
+<div class="listingblock">\r
+<div class="content">\r
+<pre><tt>$ git checkout mytopic</tt></pre>\r
+</div></div>\r
+<p>However, your "wrong" branch and correct "mytopic" branch may\r
+differ in files that you have locally modified, in which case,\r
+the above checkout would fail like this:</p>\r
+<div class="listingblock">\r
+<div class="content">\r
+<pre><tt>$ git checkout mytopic\r
+fatal: Entry 'frotz' not uptodate. Cannot merge.</tt></pre>\r
+</div></div>\r
+<p>You can give the <tt>-m</tt> flag to the command, which would try a\r
+three-way merge:</p>\r
+<div class="listingblock">\r
+<div class="content">\r
+<pre><tt>$ git checkout -m mytopic\r
+Auto-merging frotz</tt></pre>\r
+</div></div>\r
+<p>After this three-way merge, the local modifications are _not_\r
+registered in your index file, so <tt>git diff</tt> would show you what\r
+changes you made since the tip of the new branch.</p>\r
+</li>\r
+<li>\r
+<p>\r
+When a merge conflict happens during switching branches with\r
+the <tt>-m</tt> option, you would see something like this:\r
+</p>\r
+<div class="listingblock">\r
+<div class="content">\r
+<pre><tt>$ git checkout -m mytopic\r
+Auto-merging frotz\r
+merge: warning: conflicts during merge\r
+ERROR: Merge conflict in frotz\r
+fatal: merge program failed</tt></pre>\r
+</div></div>\r
+<p>At this point, <tt>git diff</tt> shows the changes cleanly merged as in\r
+the previous example, as well as the changes in the conflicted\r
+files. Edit and resolve the conflict and mark it resolved with\r
+<tt>git update-index</tt> as usual:</p>\r
+<div class="listingblock">\r
+<div class="content">\r
+<pre><tt>$ edit frotz\r
+$ git update-index frotz</tt></pre>\r
+</div></div>\r
+</li>\r
+</ol>\r