{"id":17656,"date":"2024-05-29T09:13:33","date_gmt":"2024-05-29T09:13:33","guid":{"rendered":"http:\/\/www.max-sperling.bplaced.net\/?p=17656"},"modified":"2024-05-29T10:45:42","modified_gmt":"2024-05-29T10:45:42","slug":"2-way-vs-3-way-merge-git","status":"publish","type":"post","link":"http:\/\/www.max-sperling.bplaced.net\/?p=17656","title":{"rendered":"2-way vs. 3-way merge"},"content":{"rendered":"<p><strong>Scenario<\/strong><\/p>\n<pre>\r\n             c1b06e --- 62d8d3 [feature]\r\n              \/\r\ne73a83 --- 6cfaec --- 90ed1b [develop]\r\n<\/pre>\n<p>Goal: Merge feature into develop.<\/p>\n<hr>\n<p><strong>2-way merge<\/strong><\/p>\n<p>Solve the merge conflicts with comparing 90ed1b (develop) and 62d8d3 (feature).<\/p>\n<table>\n<tr>\n<td>\n<pre class=\"brush: cpp; title: colors.hpp (90ed1b); notranslate\" title=\"colors.hpp (90ed1b)\">\r\nenum Colors\r\n{\r\n  Red,\r\n  Navy,\r\n  Green\r\n}\r\n<\/pre>\n<\/td>\n<td>\n<pre class=\"brush: cpp; title: colors.hpp (62d8d3); notranslate\" title=\"colors.hpp (62d8d3)\">\r\nenum Colors\r\n{\r\n  Red,\r\n  Blue,\r\n  Lime\r\n}\r\n<\/pre>\n<\/td>\n<\/tr>\n<\/table>\n<p>It&#8217;s <u>not<\/u> possible to solve the merge conflicts with this information.<\/p>\n<hr>\n<p><strong>3-way merge<\/strong><\/p>\n<p>Solve the merge conflicts with comparing 90ed1b (develop), 6cfaec (merge-base) and 62d8d3 (feature).<\/p>\n<table>\n<tr>\n<td>\n<pre class=\"brush: cpp; title: colors.hpp (90ed1b); notranslate\" title=\"colors.hpp (90ed1b)\">\r\nenum Colors\r\n{\r\n  Red,\r\n  Navy,\r\n  Green\r\n}\r\n<\/pre>\n<\/td>\n<td>\n<pre class=\"brush: cpp; title: colors.hpp (6cfaec); notranslate\" title=\"colors.hpp (6cfaec)\">\r\nenum Colors\r\n{\r\n  Red,\r\n  Blue,\r\n  Green\r\n}\r\n<\/pre>\n<\/td>\n<td>\n<pre class=\"brush: cpp; title: colors.hpp (62d8d3); notranslate\" title=\"colors.hpp (62d8d3)\">\r\nenum Colors\r\n{\r\n  Red,\r\n  Blue,\r\n  Lime\r\n}\r\n<\/pre>\n<\/td>\n<\/tr>\n<\/table>\n<p>It&#8217;s possible to solve the merge conflicts with this information.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Scenario c1b06e &#8212; 62d8d3 [feature] \/ e73a83 &#8212; 6cfaec &#8212; 90ed1b [develop] Goal: Merge feature into develop. 2-way merge Solve<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"inline_featured_image":false},"categories":[24],"tags":[],"_links":{"self":[{"href":"http:\/\/www.max-sperling.bplaced.net\/index.php?rest_route=\/wp\/v2\/posts\/17656"}],"collection":[{"href":"http:\/\/www.max-sperling.bplaced.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.max-sperling.bplaced.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.max-sperling.bplaced.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.max-sperling.bplaced.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=17656"}],"version-history":[{"count":28,"href":"http:\/\/www.max-sperling.bplaced.net\/index.php?rest_route=\/wp\/v2\/posts\/17656\/revisions"}],"predecessor-version":[{"id":17684,"href":"http:\/\/www.max-sperling.bplaced.net\/index.php?rest_route=\/wp\/v2\/posts\/17656\/revisions\/17684"}],"wp:attachment":[{"href":"http:\/\/www.max-sperling.bplaced.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=17656"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.max-sperling.bplaced.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=17656"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.max-sperling.bplaced.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=17656"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}