{"id":1466,"date":"2023-11-11T18:47:25","date_gmt":"2023-11-11T18:47:25","guid":{"rendered":"https:\/\/blog.thomarite.uk\/?p=1466"},"modified":"2023-11-11T18:47:25","modified_gmt":"2023-11-11T18:47:25","slug":"git-merge-vs-rebase-diff-patch-stash","status":"publish","type":"post","link":"https:\/\/blog.thomarite.uk\/index.php\/2023\/11\/11\/git-merge-vs-rebase-diff-patch-stash\/","title":{"rendered":"Git merge vs rebase, diff, patch, stash"},"content":{"rendered":"\n<p>This week I have had a bit of a struggle with git when trying to develop a change and I was getting constant conflicts when trying to get my branch up to date with main.<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p><a href=\"https:\/\/www.atlassian.com\/git\/tutorials\/merging-vs-rebasing\">https:\/\/www.atlassian.com\/git\/tutorials\/merging-vs-rebasing<\/a>: A refresh for merge vs rebase. When I first started with git, the environment was pro rebase. But after that job, all places were pro merge. Somehow I visualize better a rebase. I will start using rebase to see if I really understand.<\/p>\n\n\n\n<p><a href=\"https:\/\/www.freecodecamp.org\/news\/git-diff-and-patch\/\">https:\/\/www.freecodecamp.org\/news\/git-diff-and-patch\/<\/a>: That&#8217;s how I finally managed to push my change into master. I had a diff generated by my gitlab PR and applied it into master. <\/p>\n\n\n\n<p><a href=\"https:\/\/opensource.com\/article\/21\/4\/git-stash\">https:\/\/opensource.com\/article\/21\/4\/git-stash<\/a>: Something I already commented about but hardly used.<\/p>\n\n\n\n<p><a href=\"https:\/\/opensource.com\/article\/21\/3\/git-cherry-pick\">https:\/\/opensource.com\/article\/21\/3\/git-cherry-pick<\/a>: Never used it but I was reading about this week as I thought was my only way out from the merge conflict nightmare I was in.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This week I have had a bit of a struggle with git when trying to develop a change and I was getting constant conflicts when trying to get my branch up to date with main. https:\/\/www.atlassian.com\/git\/tutorials\/merging-vs-rebasing: A refresh for merge vs rebase. When I first started with git, the environment was pro rebase. But after &hellip; <a href=\"https:\/\/blog.thomarite.uk\/index.php\/2023\/11\/11\/git-merge-vs-rebase-diff-patch-stash\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Git merge vs rebase, diff, patch, stash&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-1466","post","type-post","status-publish","format-standard","hentry","category-uncategorised"],"_links":{"self":[{"href":"https:\/\/blog.thomarite.uk\/index.php\/wp-json\/wp\/v2\/posts\/1466","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.thomarite.uk\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.thomarite.uk\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.thomarite.uk\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.thomarite.uk\/index.php\/wp-json\/wp\/v2\/comments?post=1466"}],"version-history":[{"count":1,"href":"https:\/\/blog.thomarite.uk\/index.php\/wp-json\/wp\/v2\/posts\/1466\/revisions"}],"predecessor-version":[{"id":1467,"href":"https:\/\/blog.thomarite.uk\/index.php\/wp-json\/wp\/v2\/posts\/1466\/revisions\/1467"}],"wp:attachment":[{"href":"https:\/\/blog.thomarite.uk\/index.php\/wp-json\/wp\/v2\/media?parent=1466"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.thomarite.uk\/index.php\/wp-json\/wp\/v2\/categories?post=1466"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.thomarite.uk\/index.php\/wp-json\/wp\/v2\/tags?post=1466"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}