{"id":8698,"date":"2020-10-02T11:08:43","date_gmt":"2020-10-02T11:08:43","guid":{"rendered":"http:\/\/www.max-sperling.bplaced.net\/?p=8698"},"modified":"2024-02-16T10:41:30","modified_gmt":"2024-02-16T10:41:30","slug":"resolve-conflicts-for-binary-files-git","status":"publish","type":"post","link":"http:\/\/www.max-sperling.bplaced.net\/?p=8698","title":{"rendered":"Resolve conflicts for binary files (Git)"},"content":{"rendered":"<p>There are common scenarios where you possibly have to resolve conflicts. They are cherry-pick, merge, rebase and revert. If those conflicts are found in binary files it makes no sence to use a mergetool.<\/p>\n<p>Instead use the following git command:<\/p>\n<pre>\r\n$ git checkout --[ours|theirs] -- path\/to\/bin_file\r\n<\/pre>\n<p>Sounds easy, but you sometimes have to think twice if you want in that scenario &#8216;ours&#8217; or &#8216;theirs&#8217;.<\/p>\n<p>As a general hint:<br \/>\n&#8211; &#8216;ours&#8217; is where the changes are happening<br \/>\n&#8211; &#8216;theirs&#8217; is the foundation for the changes<\/p>\n<hr>\n<p><strong>Cherry-pick \/ Merge<\/strong><\/p>\n<pre>\r\n- ours   ... the branch where you cherry-pick \/ merge into\r\n- theirs ... the branch where you cherry-pick \/ merge from\r\n<\/pre>\n<hr>\n<p><strong>Rebase<\/strong><\/p>\n<pre>\r\n- ours   ... the branch which gets rebased onto another base\r\n- theirs ... the branch which acts as the base for the rebase\r\n<\/pre>\n<hr>\n<p><strong>Revert<\/strong><\/p>\n<pre>\r\n- ours   ... the state on the currently newest commit\r\n- theirs ... the state before the commit to be reverted\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>There are common scenarios where you possibly have to resolve conflicts. They are cherry-pick, merge, rebase and revert. If those<\/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\/8698"}],"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=8698"}],"version-history":[{"count":1,"href":"http:\/\/www.max-sperling.bplaced.net\/index.php?rest_route=\/wp\/v2\/posts\/8698\/revisions"}],"predecessor-version":[{"id":16811,"href":"http:\/\/www.max-sperling.bplaced.net\/index.php?rest_route=\/wp\/v2\/posts\/8698\/revisions\/16811"}],"wp:attachment":[{"href":"http:\/\/www.max-sperling.bplaced.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=8698"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.max-sperling.bplaced.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=8698"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.max-sperling.bplaced.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=8698"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}