{"id":27927,"date":"2015-11-02T12:00:04","date_gmt":"2015-11-02T10:00:04","guid":{"rendered":"http:\/\/examples.javacodegeeks.com\/?p=27927"},"modified":"2019-04-23T14:56:24","modified_gmt":"2019-04-23T11:56:24","slug":"git-undo-merge-example","status":"publish","type":"post","link":"https:\/\/examples.javacodegeeks.com\/software-development\/git\/git-undo-merge-example\/","title":{"rendered":"Git Undo Merge Example"},"content":{"rendered":"<p>In the previous example, we have talked about <a href=\"http:\/\/examples.javacodegeeks.com\/software-development\/git-merge-conflict-example\/\" target=\"_blank\" rel=\"noopener noreferrer\">Git Merge Conflict Example<\/a>. Merge process sometimes can be automatized or can required human interaction and when this happens, few times, problems come around. In this topic, we shall cover about how to unmerge a branch taking advantage of Git&#8217;s power.<\/p>\n<p><strong>What exactly is undo merge?<\/strong> Well, if <strong>merge<\/strong> is the process to join another branch into the current working branch then <strong>unmerge<\/strong> is the process to remove changes merged into the current working branch.<br \/>\n&nbsp;<br \/>\n&nbsp;<br \/>\n&nbsp;\n<\/p>\n<h2>1. Why undo merge?<\/h2>\n<p>First, we have to put focus in our commits. In the real world, we work in a specific branch and this branch has a bunch of commits but each one must be atomic in order to ensure the application state with each one. Taking this into account, merge or unmerge should provide changes as a single operation.<\/p>\n<p>We are not crazy if we want to undo a merge. There are some reasons to do this:<\/p>\n<ol>\n<li>Merge had mistakes. People in charge of this task, require communication with the team if there are conflicts. If each team member is working in his own branch, he can <code>rebase<\/code> his branch in order to keep updated and easily merged.<\/li>\n<li>Feature should be moved to the future. Have you been working very hard on new features and have not been included in the release? In the real world, it is possible. We can perform a merge with some new features but what about if bugs appears on production? we need to undo the merge and fix the problem as soon as we can.<\/li>\n<\/ol>\n<h2>2. Undo merge<\/h2>\n<p>Imagine the first scenario mentioned above. We have finished the merge and we can see that does not compile due to missing lines which were not included in the merge. In this scenario, we have 2 options: Add the missing line or do the merge again. Add the missing line sounds easy (includes a new commit) but remember that every change in the application must be atomic. If we do this then we will add another commit or maybe we will amend the merge commit. But, in order to keep our history clean we should perform the the merge again.<\/p>\n<p>In this example, we are going to use an spring-boot application. The current status of the application is the image below, two branches (master and new-feature)<\/p>\n<p><a href=\"http:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2015\/10\/git-undo-merge-example.jpg\"><img decoding=\"async\" src=\"http:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2015\/10\/git-undo-merge-example.jpg\" alt=\"git-undo-merge-example\" width=\"640\" height=\"265\" class=\"aligncenter size-full wp-image-28214\" srcset=\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2015\/10\/git-undo-merge-example.jpg 640w, https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2015\/10\/git-undo-merge-example-300x124.jpg 300w\" sizes=\"(max-width: 640px) 100vw, 640px\" \/><\/a><div style=\"display:inline-block; margin: 15px 0;\"> <div id=\"adngin-JavaCodeGeeks_incontent_video-0\" style=\"display:inline-block;\"><\/div> <\/div><\/p>\n<ol>\n<li>We will proceed with merge. First, make sure we are at master branch.\n<pre class=\"brush:bash\">git merge new-feature\n<\/pre>\n<\/li>\n<li>Merge has finished but with one error in <code>src\/main\/java\/com\/javacodegeeks\/examples\/PhoneTypesController.java<\/code>.\n<pre class=\"brush:bash\">M  pom.xml\nM  src\/main\/java\/com\/javacodegeeks\/examples\/Application.java\nA  src\/main\/java\/com\/javacodegeeks\/examples\/PhoneType.java\nA  src\/main\/java\/com\/javacodegeeks\/examples\/PhoneTypeRepository.java\nUU src\/main\/java\/com\/javacodegeeks\/examples\/PhoneTypesController.java\n<\/pre>\n<\/li>\n<li>We are going to proceed resolving conflicts but accidentally we will make a mistake during merge. We will keep changes from <code>HEAD<\/code>.\n<pre class=\"brush:java\">package com.javacodegeeks.examples;\n\nimport org.springframework.beans.factory.annotation.Autowired;\nimport org.springframework.web.bind.annotation.RequestMapping;\nimport org.springframework.web.bind.annotation.RequestMethod;\nimport org.springframework.web.bind.annotation.RestController;\n\nimport java.util.Arrays;\nimport java.util.List;\n\n@RestController\n@RequestMapping(\"\/phonetypes\")\npublic class PhoneTypesController {\n\n&lt;&lt;&lt;&lt;&lt;&lt;&lt; HEAD\n        @RequestMapping(value = \"\/phonetypes\", method = RequestMethod.GET)\n        public List get() {\n                return Arrays.asList(\"home\", \"mobile\", \"phone\");\n=======\n        @Autowired\n        private PhoneTypeRepository repository;\n\n        @RequestMapping(method = RequestMethod.GET)\n        public List get() {\n                return this.repository.findAll();\n&gt;&gt;&gt;&gt;&gt;&gt;&gt; new-feature\n        }\n\n}\n<\/pre>\n<p>Our code should look like this:<\/p>\n<pre class=\"brush:java\">package com.javacodegeeks.examples;\n\nimport org.springframework.beans.factory.annotation.Autowired;\nimport org.springframework.web.bind.annotation.RequestMapping;\nimport org.springframework.web.bind.annotation.RequestMethod;\nimport org.springframework.web.bind.annotation.RestController;\n\nimport java.util.Arrays;\nimport java.util.List;\n\n@RestController\n@RequestMapping(\"\/phonetypes\")\npublic class PhoneTypesController {\n\n        @RequestMapping(value = \"\/phonetypes\", method = RequestMethod.GET)\n        public List get() {\n                return Arrays.asList(\"home\", \"mobile\", \"phone\");\n        }\n\n}\n<\/pre>\n<p>Have you seem the error? We have added all the infrastructure for database but we are not using it.<\/p>\n<p>This merge does not accomplish our <strong>atomic commit<\/strong> rule. If we want to fix it we have to add another commit with the correct changes.<\/li>\n<li>After the merge check the git&#8217;s history using <code>git log --oneline --decorate --graph<\/code>.\n<pre class=\"brush:bash\">5332437 (HEAD -&gt; master) Merge branch 'new-feature'\neeec84f (new-feature) Add jpa integration\n3a32600 Add dummy data\n7f134f0 Add Controller\n9e463f7 Initial commit\n<\/pre>\n<\/li>\n<li>Now, we will proceed undoing merge. In this case, we will delete this merge from our master&#8217;s history due to is not atomic. To do that, we are going to use <code>git reset<\/code> command. We use <code>--hard<\/code> in order to delete all changes and <code>3a32600<\/code> which is the commit id where we want to stay.\n<pre class=\"brush:bash\">git reset --hard 3a32600\n<\/pre>\n<\/li>\n<li>Check the log again and we have returned to the prior state.\n<pre class=\"brush:bash\">3a32600 Add dummy data\n7f134f0 Add Controller\n9e463f7 Initial commit\n<\/pre>\n<\/li>\n<li>Now, we are going to perform merge again but a good one this time. Make sure the class looks like this:\n<pre class=\"brush:java\">package com.javacodegeeks.examples;\n\nimport org.springframework.beans.factory.annotation.Autowired;\nimport org.springframework.web.bind.annotation.RequestMapping;\nimport org.springframework.web.bind.annotation.RequestMethod;\nimport org.springframework.web.bind.annotation.RestController;\n\nimport java.util.Arrays;\nimport java.util.List;\n\n@RestController\n@RequestMapping(\"\/phonetypes\")\npublic class PhoneTypesController {\n\n        @Autowired\n        private PhoneTypeRepository repository;\n\n        @RequestMapping(method = RequestMethod.GET)\n        public List get() {\n                return this.repository.findAll();\n        }\n\n}\n<\/pre>\n<\/li>\n<li>But, what happen if we need to add a new item in the current list and remove our changes with database integration? At this time, our merge is ok because respect the <b>atomic commit<\/b> rule. So, there are no reason to delete it from the history. We will not perform another merge in the future to re-integrate changes from <code>new-feature<\/code> branch. In this case, we are going to revert changes using <code>git revert<\/code> command.\n<pre class=\"brush:bash\">git revert -m 1 HEAD\n<\/pre>\n<\/li>\n<li>Check logs one more time and now we will see a new commit with the message <em>Revert &#8220;Merge branch &#8216;new-feature'&#8221;<\/em>. In this case, our repository looks like in the commit id <code>3a32600<\/code>.\n<pre class=\"brush:bash\">2fb51a5 (HEAD -&gt; master) Revert \"Merge branch 'new-feature'\"\n16ddc15 Merge branch 'new-feature'\n12e7d4c (new-feature) Add jpa integration\n3a32600 Add dummy data\n7f134f0 Add Controller\n9e463f7 Initial commit\n<\/pre>\n<\/li>\n<li>Finally, suppose we have added some additional changes and it is time to include <code>new-feature<\/code> branch in <code>master<\/code> again. What happen if we try to do the merge again?\n<pre class=\"brush:bash\">git merge new-feature\nAlready up-to-date.\n<\/pre>\n<p>Merge was performed before and git does not allow us to do it again. To reintegrate with those changes we have to revert the commit reverted in the step 8.[ulp id=&#8217;pzgfvmZhgslwSymm&#8217;]<\/p>\n<pre class=\"brush:bash\">git revert 2fb51a5\n<\/pre>\n<p>Check logs and review if everything is ok in your class.<\/p>\n<pre class=\"brush:bash\">275068d (HEAD -&gt; master) Revert \"Revert \"Merge branch 'new-feature'\"\"\n2fb51a5 Revert \"Merge branch 'new-feature'\"\n16ddc15 Merge branch 'new-feature'\n12e7d4c (new-feature) Add jpa integration\n3a32600 Add dummy data\n7f134f0 Add Controller\n9e463f7 Initial commit\n<\/pre>\n<\/li>\n<\/ol>\n<h2>3. Download the Source Code<\/h2>\n<div class=\"download\"><strong>Download<\/strong><br \/>\nYou can download the full source code of this example here: <strong><a href=\"http:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2015\/10\/git-undo-merge-example.zip\">GitUndoMergeExample<\/a><\/strong><\/div>\n","protected":false},"excerpt":{"rendered":"<p>In the previous example, we have talked about Git Merge Conflict Example. Merge process sometimes can be automatized or can required human interaction and when this happens, few times, problems come around. In this topic, we shall cover about how to unmerge a branch taking advantage of Git&#8217;s power. What exactly is undo merge? Well, &hellip;<\/p>\n","protected":false},"author":58,"featured_media":27377,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1353],"tags":[1203],"class_list":["post-27927","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-git","tag-git"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Git Undo Merge Example - Java Code Geeks<\/title>\n<meta name=\"description\" content=\"In the previous example, we have talked about Git Merge Conflict Example. Merge process sometimes can be automatized or can required human interaction and\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/examples.javacodegeeks.com\/software-development\/git\/git-undo-merge-example\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Git Undo Merge Example - Java Code Geeks\" \/>\n<meta property=\"og:description\" content=\"In the previous example, we have talked about Git Merge Conflict Example. Merge process sometimes can be automatized or can required human interaction and\" \/>\n<meta property=\"og:url\" content=\"https:\/\/examples.javacodegeeks.com\/software-development\/git\/git-undo-merge-example\/\" \/>\n<meta property=\"og:site_name\" content=\"Examples Java Code Geeks\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/javacodegeeks\" \/>\n<meta property=\"article:published_time\" content=\"2015-11-02T10:00:04+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2019-04-23T11:56:24+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2015\/09\/git-logo.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"150\" \/>\n\t<meta property=\"og:image:height\" content=\"150\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Eddu Melendez\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@eddumelendez\" \/>\n<meta name=\"twitter:site\" content=\"@javacodegeeks\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Eddu Melendez\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"6 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/software-development\/git\/git-undo-merge-example\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/software-development\/git\/git-undo-merge-example\/\"},\"author\":{\"name\":\"Eddu Melendez\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/#\/schema\/person\/5f3392b0e6e58390b9565c8ca1680a69\"},\"headline\":\"Git Undo Merge Example\",\"datePublished\":\"2015-11-02T10:00:04+00:00\",\"dateModified\":\"2019-04-23T11:56:24+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/software-development\/git\/git-undo-merge-example\/\"},\"wordCount\":774,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/#organization\"},\"image\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/software-development\/git\/git-undo-merge-example\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2015\/09\/git-logo.jpg\",\"keywords\":[\"git\"],\"articleSection\":[\"Git\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/examples.javacodegeeks.com\/software-development\/git\/git-undo-merge-example\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/software-development\/git\/git-undo-merge-example\/\",\"url\":\"https:\/\/examples.javacodegeeks.com\/software-development\/git\/git-undo-merge-example\/\",\"name\":\"Git Undo Merge Example - Java Code Geeks\",\"isPartOf\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/software-development\/git\/git-undo-merge-example\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/software-development\/git\/git-undo-merge-example\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2015\/09\/git-logo.jpg\",\"datePublished\":\"2015-11-02T10:00:04+00:00\",\"dateModified\":\"2019-04-23T11:56:24+00:00\",\"description\":\"In the previous example, we have talked about Git Merge Conflict Example. Merge process sometimes can be automatized or can required human interaction and\",\"breadcrumb\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/software-development\/git\/git-undo-merge-example\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/examples.javacodegeeks.com\/software-development\/git\/git-undo-merge-example\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/software-development\/git\/git-undo-merge-example\/#primaryimage\",\"url\":\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2015\/09\/git-logo.jpg\",\"contentUrl\":\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2015\/09\/git-logo.jpg\",\"width\":150,\"height\":150},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/software-development\/git\/git-undo-merge-example\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/examples.javacodegeeks.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Software Development\",\"item\":\"https:\/\/examples.javacodegeeks.com\/category\/software-development\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Git\",\"item\":\"https:\/\/examples.javacodegeeks.com\/category\/software-development\/git\/\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"Git Undo Merge Example\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/#website\",\"url\":\"https:\/\/examples.javacodegeeks.com\/\",\"name\":\"Java Code Geeks\",\"description\":\"Java Examples and Code Snippets\",\"publisher\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/#organization\"},\"alternateName\":\"JCG\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/examples.javacodegeeks.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/#organization\",\"name\":\"Exelixis Media P.C.\",\"url\":\"https:\/\/examples.javacodegeeks.com\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png\",\"contentUrl\":\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png\",\"width\":864,\"height\":246,\"caption\":\"Exelixis Media P.C.\"},\"image\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/javacodegeeks\",\"https:\/\/x.com\/javacodegeeks\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/#\/schema\/person\/5f3392b0e6e58390b9565c8ca1680a69\",\"name\":\"Eddu Melendez\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2015\/08\/Eddu-Melendez-96x96.jpg\",\"contentUrl\":\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2015\/08\/Eddu-Melendez-96x96.jpg\",\"caption\":\"Eddu Melendez\"},\"description\":\"Eddu is a Peruvian software engineer. He is interested in Java, Spring Framework and Mule ESB. He is also very enthusiastic to learn new stuff.\",\"sameAs\":[\"http:\/\/eddumelendez.github.io\/\",\"https:\/\/pe.linkedin.com\/in\/eddumelendez\",\"https:\/\/x.com\/eddumelendez\"],\"url\":\"https:\/\/examples.javacodegeeks.com\/author\/eddu-melendez\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Git Undo Merge Example - Java Code Geeks","description":"In the previous example, we have talked about Git Merge Conflict Example. Merge process sometimes can be automatized or can required human interaction and","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/examples.javacodegeeks.com\/software-development\/git\/git-undo-merge-example\/","og_locale":"en_US","og_type":"article","og_title":"Git Undo Merge Example - Java Code Geeks","og_description":"In the previous example, we have talked about Git Merge Conflict Example. Merge process sometimes can be automatized or can required human interaction and","og_url":"https:\/\/examples.javacodegeeks.com\/software-development\/git\/git-undo-merge-example\/","og_site_name":"Examples Java Code Geeks","article_publisher":"https:\/\/www.facebook.com\/javacodegeeks","article_published_time":"2015-11-02T10:00:04+00:00","article_modified_time":"2019-04-23T11:56:24+00:00","og_image":[{"width":150,"height":150,"url":"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2015\/09\/git-logo.jpg","type":"image\/jpeg"}],"author":"Eddu Melendez","twitter_card":"summary_large_image","twitter_creator":"@eddumelendez","twitter_site":"@javacodegeeks","twitter_misc":{"Written by":"Eddu Melendez","Est. reading time":"6 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/examples.javacodegeeks.com\/software-development\/git\/git-undo-merge-example\/#article","isPartOf":{"@id":"https:\/\/examples.javacodegeeks.com\/software-development\/git\/git-undo-merge-example\/"},"author":{"name":"Eddu Melendez","@id":"https:\/\/examples.javacodegeeks.com\/#\/schema\/person\/5f3392b0e6e58390b9565c8ca1680a69"},"headline":"Git Undo Merge Example","datePublished":"2015-11-02T10:00:04+00:00","dateModified":"2019-04-23T11:56:24+00:00","mainEntityOfPage":{"@id":"https:\/\/examples.javacodegeeks.com\/software-development\/git\/git-undo-merge-example\/"},"wordCount":774,"commentCount":0,"publisher":{"@id":"https:\/\/examples.javacodegeeks.com\/#organization"},"image":{"@id":"https:\/\/examples.javacodegeeks.com\/software-development\/git\/git-undo-merge-example\/#primaryimage"},"thumbnailUrl":"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2015\/09\/git-logo.jpg","keywords":["git"],"articleSection":["Git"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/examples.javacodegeeks.com\/software-development\/git\/git-undo-merge-example\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/examples.javacodegeeks.com\/software-development\/git\/git-undo-merge-example\/","url":"https:\/\/examples.javacodegeeks.com\/software-development\/git\/git-undo-merge-example\/","name":"Git Undo Merge Example - Java Code Geeks","isPartOf":{"@id":"https:\/\/examples.javacodegeeks.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/examples.javacodegeeks.com\/software-development\/git\/git-undo-merge-example\/#primaryimage"},"image":{"@id":"https:\/\/examples.javacodegeeks.com\/software-development\/git\/git-undo-merge-example\/#primaryimage"},"thumbnailUrl":"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2015\/09\/git-logo.jpg","datePublished":"2015-11-02T10:00:04+00:00","dateModified":"2019-04-23T11:56:24+00:00","description":"In the previous example, we have talked about Git Merge Conflict Example. Merge process sometimes can be automatized or can required human interaction and","breadcrumb":{"@id":"https:\/\/examples.javacodegeeks.com\/software-development\/git\/git-undo-merge-example\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/examples.javacodegeeks.com\/software-development\/git\/git-undo-merge-example\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/examples.javacodegeeks.com\/software-development\/git\/git-undo-merge-example\/#primaryimage","url":"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2015\/09\/git-logo.jpg","contentUrl":"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2015\/09\/git-logo.jpg","width":150,"height":150},{"@type":"BreadcrumbList","@id":"https:\/\/examples.javacodegeeks.com\/software-development\/git\/git-undo-merge-example\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/examples.javacodegeeks.com\/"},{"@type":"ListItem","position":2,"name":"Software Development","item":"https:\/\/examples.javacodegeeks.com\/category\/software-development\/"},{"@type":"ListItem","position":3,"name":"Git","item":"https:\/\/examples.javacodegeeks.com\/category\/software-development\/git\/"},{"@type":"ListItem","position":4,"name":"Git Undo Merge Example"}]},{"@type":"WebSite","@id":"https:\/\/examples.javacodegeeks.com\/#website","url":"https:\/\/examples.javacodegeeks.com\/","name":"Java Code Geeks","description":"Java Examples and Code Snippets","publisher":{"@id":"https:\/\/examples.javacodegeeks.com\/#organization"},"alternateName":"JCG","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/examples.javacodegeeks.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/examples.javacodegeeks.com\/#organization","name":"Exelixis Media P.C.","url":"https:\/\/examples.javacodegeeks.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/examples.javacodegeeks.com\/#\/schema\/logo\/image\/","url":"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","contentUrl":"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","width":864,"height":246,"caption":"Exelixis Media P.C."},"image":{"@id":"https:\/\/examples.javacodegeeks.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/javacodegeeks","https:\/\/x.com\/javacodegeeks"]},{"@type":"Person","@id":"https:\/\/examples.javacodegeeks.com\/#\/schema\/person\/5f3392b0e6e58390b9565c8ca1680a69","name":"Eddu Melendez","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/examples.javacodegeeks.com\/#\/schema\/person\/image\/","url":"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2015\/08\/Eddu-Melendez-96x96.jpg","contentUrl":"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2015\/08\/Eddu-Melendez-96x96.jpg","caption":"Eddu Melendez"},"description":"Eddu is a Peruvian software engineer. He is interested in Java, Spring Framework and Mule ESB. He is also very enthusiastic to learn new stuff.","sameAs":["http:\/\/eddumelendez.github.io\/","https:\/\/pe.linkedin.com\/in\/eddumelendez","https:\/\/x.com\/eddumelendez"],"url":"https:\/\/examples.javacodegeeks.com\/author\/eddu-melendez\/"}]}},"_links":{"self":[{"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/posts\/27927","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/users\/58"}],"replies":[{"embeddable":true,"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/comments?post=27927"}],"version-history":[{"count":0,"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/posts\/27927\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/media\/27377"}],"wp:attachment":[{"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/media?parent=27927"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/categories?post=27927"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/tags?post=27927"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}