{"id":7365,"date":"2020-06-15T08:49:25","date_gmt":"2020-06-15T08:49:25","guid":{"rendered":"http:\/\/www.max-sperling.bplaced.net\/?p=7365"},"modified":"2024-05-08T13:12:31","modified_gmt":"2024-05-08T13:12:31","slug":"merge-ff-vs-no-ff-git","status":"publish","type":"post","link":"http:\/\/www.max-sperling.bplaced.net\/?p=7365","title":{"rendered":"Merging &#8211; linear vs. non-linear history (Git)"},"content":{"rendered":"<p>After developing a feature or fix you want to merge that branch onto the parent branch. There are two main different approches: One creates a linear and the other a non-linear history.<\/p>\n<hr>\n<p><strong>Scenario<\/strong><\/p>\n<pre>\r\n          c1b0---62d8 [feature]\r\n         \/\r\ne73a---6cfa---90ed [develop]\r\n<\/pre>\n<hr>\n<p><strong>Linear history<\/strong><\/p>\n<p>Rebasing before the merging, without creating a merge commit.<\/p>\n<p><u>Result<\/u><\/p>\n<pre>\r\ne73a---6cfa---90ed---c1b0*---62d8* [develop]\r\n<\/pre>\n<p>* Those commit hashes are actually different, because of the rebase.<\/p>\n<hr>\n<p><strong>Non-linear history<\/strong><\/p>\n<p>Merging without rebasing before, creating a merge commit.<\/p>\n<p><u>Result<\/u><\/p>\n<pre>\r\n          c1b0---62d8 [feature]\r\n         \/           \\\r\ne73a---6cfa---90ed---2e1g* [develop]\r\n<\/pre>\n<p>* This is the merge commit, necessary because of the missing rebase.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>After developing a feature or fix you want to merge that branch onto the parent branch. There are two main<\/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\/7365"}],"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=7365"}],"version-history":[{"count":4,"href":"http:\/\/www.max-sperling.bplaced.net\/index.php?rest_route=\/wp\/v2\/posts\/7365\/revisions"}],"predecessor-version":[{"id":17575,"href":"http:\/\/www.max-sperling.bplaced.net\/index.php?rest_route=\/wp\/v2\/posts\/7365\/revisions\/17575"}],"wp:attachment":[{"href":"http:\/\/www.max-sperling.bplaced.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=7365"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.max-sperling.bplaced.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=7365"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.max-sperling.bplaced.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=7365"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}