{"id":4491,"date":"2020-09-08T19:48:33","date_gmt":"2020-09-08T20:18:33","guid":{"rendered":"https:\/\/ultering.com\/it4us\/?p=4491"},"modified":"2021-01-21T15:29:39","modified_gmt":"2021-01-21T15:59:39","slug":"git-solving-conflicts-preserving-my-files-an-easy-way-without-merging","status":"publish","type":"post","link":"https:\/\/ultering.com\/it4us\/?p=4491","title":{"rendered":"GIT: Solving conflicts preserving my files &#8211; An easy way without merging"},"content":{"rendered":"<h3>&gt;PROBLEM<\/h3>\n<p>You&#8217;ve made a pull and you got conflicts.<\/p>\n<h3>&gt;SOLUTION<\/h3>\n<p>An easy alternative without having to merge files.<\/p>\n<ol>\n<li>Take note of those files that has conflict issues.<\/li>\n<li>Move the conflicting files to a temporary folder.<\/li>\n<li>Commit again.<br \/>\ngit commit -am &#8220;solving merge conflicts preserving mine&#8221;<\/li>\n<li>Reset the state to the previous one, before the pull command.<br \/>\ngit reset &#8211;hard HEAD<\/li>\n<li>Perform pull again:<br \/>\ngit pull<\/li>\n<li>Move back the files from the temporary folder to the project folder.<\/li>\n<li>Commit again:<br \/>\ngit commit -am &#8220;solved merge conflicts preserving mine&#8221;<\/li>\n<li>Push to remote:<br \/>\ngit push<\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<h2><\/h2>\n<!--CusAds0-->\n<div style=\"font-size: 0px; height: 0px; line-height: 0px; margin: 0; padding: 0; clear: both;\"><\/div>","protected":false},"excerpt":{"rendered":"<p>&gt;PROBLEM You&#8217;ve made a pull and you got conflicts. &gt;SOLUTION An easy alternative without having to merge files. Take note of those files that has conflict issues. Move the conflicting files to a temporary folder. Commit again. git commit -am &#8220;solving merge conflicts preserving mine&#8221; Reset the state to the previous one, before the pull &#8230; <a href=\"https:\/\/ultering.com\/it4us\/?p=4491\" class=\"more-link\">Read More<span class=\"screen-reader-text\"> &#8220;GIT: Solving conflicts preserving my files &#8211; An easy way without merging&#8221;<\/span> &raquo;<\/a><\/p>\n","protected":false},"author":4,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_bbp_topic_count":0,"_bbp_reply_count":0,"_bbp_total_topic_count":0,"_bbp_total_reply_count":0,"_bbp_voice_count":0,"_bbp_anonymous_reply_count":0,"_bbp_topic_count_hidden":0,"_bbp_reply_count_hidden":0,"_bbp_forum_subforum_count":0,"footnotes":""},"categories":[35],"tags":[],"class_list":["post-4491","post","type-post","status-publish","format-standard","hentry","category-versioning"],"_links":{"self":[{"href":"https:\/\/ultering.com\/it4us\/index.php?rest_route=\/wp\/v2\/posts\/4491","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ultering.com\/it4us\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ultering.com\/it4us\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ultering.com\/it4us\/index.php?rest_route=\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/ultering.com\/it4us\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=4491"}],"version-history":[{"count":1,"href":"https:\/\/ultering.com\/it4us\/index.php?rest_route=\/wp\/v2\/posts\/4491\/revisions"}],"predecessor-version":[{"id":4494,"href":"https:\/\/ultering.com\/it4us\/index.php?rest_route=\/wp\/v2\/posts\/4491\/revisions\/4494"}],"wp:attachment":[{"href":"https:\/\/ultering.com\/it4us\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=4491"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ultering.com\/it4us\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=4491"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ultering.com\/it4us\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=4491"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}