{"id":27452,"date":"2015-10-06T11:00:47","date_gmt":"2015-10-06T08:00:47","guid":{"rendered":"http:\/\/examples.javacodegeeks.com\/?p=27452"},"modified":"2019-04-23T14:57:14","modified_gmt":"2019-04-23T11:57:14","slug":"git-commit-amend-example","status":"publish","type":"post","link":"https:\/\/examples.javacodegeeks.com\/software-development\/git\/git-commit-amend-example\/","title":{"rendered":"Git Commit Amend Example"},"content":{"rendered":"<p>In the previous post <a href=\"http:\/\/examples.javacodegeeks.com\/software-development\/git-hello-world-example\/\" target=\"_blank\" rel=\"noopener noreferrer\">Git &#8220;Hello World&#8221; Example<\/a> we learnt some basic steps about Git. In this example,&nbsp;we shall show how to edit commit messages.<\/p>\n<h2>1. Context<\/h2>\n<p>As a developers, we perform&nbsp;commits all the time while we are in the development process, adding new features, tests, documentation and so on. But, there are some cases when we forgot to add specific files, properties or miss to include some&nbsp;changes. We must take into account that every&nbsp;commit must be atomic which mean all changes must be in one commit. Then, our question now would be How can we handle these new changes? The simple question would be make another commit to fix them but our functionality will be&nbsp;involved two or more commits in the repository. For that reason, we&nbsp;could edit&nbsp;commits.&nbsp;Edit commit messages means rewrite the repository history and generate new commit ids.<\/p>\n<p><strong>Warning:<\/strong> Be careful to amend public commits&nbsp;shared by other developers.\n<\/p>\n<h2>2. Use Cases<\/h2>\n<p>There are two ways to edit messages, using <code>commit<\/code> and <code>rebase<\/code> commands.<\/p>\n<ol>\n<li>Edit single&nbsp;commit message:<br \/>\n&nbsp;<br \/>\nPerforming&nbsp;<code>git commit --amend<\/code> command will display an editor in order to edit the previous commit message. The <code>--amend<\/code> option works fine with other options like <code>--reset-author<\/code>, <code>--no-edit<\/code> and <code>--only<\/code><\/p>\n<ol>\n<li><code>--no-edit<\/code>, this option will merge your recent changes with the previous commit, new commit message will not be requested.\n<pre class=\"brush:bash\">git commit --amend --no-edit<\/pre>\n<\/li>\n<li><code>--reset-author<\/code>, this option will overwrite the author information in the most recent commit.\n<pre class=\"brush:bash\">git commit --amend --reset-author<\/pre>\n<\/li>\n<li><code>--only<\/code>, this option allow to edit the most recent commit with the exclusion of the new files staged in the repository.\n<pre class=\"brush:bash\">git commit --amend --only<\/pre>\n<\/li>\n<li><code>--reuse-message<\/code>, this option will use the commit message used in previous commits.\n<pre class=\"brush:bash\">git commit --amend --reuse-message=HEAD<\/pre>\n<\/li>\n<\/ol>\n<p>If we&nbsp;are working with public repositories and we performed amends we will have to&nbsp;force push otherwise&nbsp;we&nbsp;will get an error like that:<div style=\"display:inline-block; margin: 15px 0;\"> <div id=\"adngin-JavaCodeGeeks_incontent_video-0\" style=\"display:inline-block;\"><\/div> <\/div><\/p>\n<pre class=\"brush:bash\">To git@github.com:eddumelendez\/hello-world.git\n ! [rejected]        master -&gt; master (non-fast-forward)\nerror: failed to push some refs to 'git@github.com:eddumelendez\/hello-world.git'\nhint: Updates were rejected because the tip of your current branch is behind\nhint: its remote counterpart. Integrate the remote changes (e.g.\nhint: 'git pull ...') before pushing again.\nhint: See the 'Note about fast-forwards' in 'git push --help' for details.\n<\/pre>\n<p>In order to force update in the public repository you should use&nbsp;<code>git push --force<\/code> or <code>git push -f.<\/code><\/p>\n<pre class=\"brush:bash\">git push -f origin master<\/pre>\n<\/li>\n<li>Edit multiple commit messages:<br \/>\n&nbsp;<br \/>\nTo do this, we need to work with <code>git rebase --interactive<\/code> or <code>git rebase -i<\/code> command.<\/p>\n<pre class=\"brush:bash\">git rebase -i HEAD~2<\/pre>\n<p>Terminal will display the last two commits.<\/p>\n<pre class=\"brush:bash\">pick c50f274 Add CONTRIBUTION.md file\npick 0554b38 Fix utroque\n\n# Rebase 4be061b..0554b38 onto 4be061b (2 command(s))\n#\n# Commands:\n# p, pick = use commit\n# r, reword = use commit, but edit the commit message\n# e, edit = use commit, but stop for amending\n# s, squash = use commit, but meld into previous commit\n# f, fixup = like \"squash\", but discard this commit's log message\n# x, exec = run command (the rest of the line) using shell\n#\n# These lines can be re-ordered; they are executed from top to bottom.\n#\n# If you remove a line here THAT COMMIT WILL BE LOST.\n#\n# However, if you remove everything, the rebase will be aborted.\n#\n# Note that empty commits are commented out\n<\/pre>\n<p>If you want to rebase all history then we should use <code>git rebase -i --root.<\/code>[ulp id=&#8217;pzgfvmZhgslwSymm&#8217;]<\/p>\n<p>Also, if we want to review pending commits to be submitted to the public repository we can use:<\/p>\n<pre class=\"brush:bash\">git rebase -i origin\/master<\/pre>\n<p>Terminal will display the difference between your local repository and remote repository.<\/p>\n<p>Now, replace <code>pick<\/code> by <code>reword<\/code>, this option allow us to edit commit messages. Terminal will display each commit message to be edited.<\/li>\n<\/ol>\n<p>Below, we can see the original history and the history modified after the amend. Message has been edited from &#8220;Fix utroque&#8221; to &#8220;Replace utroque by branch name&#8221;.<\/p>\n<p><figure id=\"attachment_27690\" aria-describedby=\"caption-attachment-27690\" style=\"width: 640px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2015\/10\/git-commit-amend-example-1.jpg\"><img decoding=\"async\" class=\"size-full wp-image-27690\" src=\"http:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2015\/10\/git-commit-amend-example-1.jpg\" alt=\"original history\" width=\"640\" height=\"172\" srcset=\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2015\/10\/git-commit-amend-example-1.jpg 640w, https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2015\/10\/git-commit-amend-example-1-300x81.jpg 300w\" sizes=\"(max-width: 640px) 100vw, 640px\" \/><\/a><figcaption id=\"caption-attachment-27690\" class=\"wp-caption-text\">original history<\/figcaption><\/figure><br \/>\n<figure id=\"attachment_27533\" aria-describedby=\"caption-attachment-27533\" style=\"width: 640px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2015\/09\/git-commit-amend-example-1.jpg\"><img decoding=\"async\" class=\"size-full wp-image-27533\" src=\"http:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2015\/09\/git-commit-amend-example-1.jpg\" alt=\"rewrited history\" width=\"640\" height=\"172\" srcset=\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2015\/09\/git-commit-amend-example-1.jpg 640w, https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2015\/09\/git-commit-amend-example-1-300x81.jpg 300w\" sizes=\"(max-width: 640px) 100vw, 640px\" \/><\/a><figcaption id=\"caption-attachment-27533\" class=\"wp-caption-text\">rewrited history<\/figcaption><\/figure><\/p>\n<h2>3. Conclusion<\/h2>\n<p>As we can see, amend commit messages enable us to fix our commits for different reasons. But, also there are some considerations to take into account in order to avoid conflicts with our team. We must keep in mind when is valid to amend commits in our git workflow.<\/p>\n<h2>4. Download the Source Code<\/h2>\n<p>This was an example of Git Commit Amend. We will use the source code completed of <a href=\"http:\/\/examples.javacodegeeks.com\/software-development\/git-hello-world-example\/\" target=\"_blank\" rel=\"noopener noreferrer\">Git &#8220;Hello World&#8221; Example<\/a> to start with this one.<\/p>\n<div class=\"download\"><strong>Download<\/strong><br \/>\nYou can download the full source code of this example here: <a href=\"http:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2015\/09\/git-hello-world-example.zip\"><strong>git-hello-world-example<\/strong><\/a><\/div>\n","protected":false},"excerpt":{"rendered":"<p>In the previous post Git &#8220;Hello World&#8221; Example we learnt some basic steps about Git. In this example,&nbsp;we shall show how to edit commit messages. 1. Context As a developers, we perform&nbsp;commits all the time while we are in the development process, adding new features, tests, documentation and so on. But, there are some cases &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-27452","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 Commit Amend Example - Java Code Geeks<\/title>\n<meta name=\"description\" content=\"In the previous post Git &quot;Hello World&quot; Example we learnt some basic steps about Git. In this example,&nbsp;we shall show how to edit commit messages. 1.\" \/>\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-commit-amend-example\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Git Commit Amend Example - Java Code Geeks\" \/>\n<meta property=\"og:description\" content=\"In the previous post Git &quot;Hello World&quot; Example we learnt some basic steps about Git. In this example,&nbsp;we shall show how to edit commit messages. 1.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/examples.javacodegeeks.com\/software-development\/git\/git-commit-amend-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-10-06T08:00:47+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2019-04-23T11:57:14+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=\"4 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-commit-amend-example\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/software-development\/git\/git-commit-amend-example\/\"},\"author\":{\"name\":\"Eddu Melendez\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/#\/schema\/person\/5f3392b0e6e58390b9565c8ca1680a69\"},\"headline\":\"Git Commit Amend Example\",\"datePublished\":\"2015-10-06T08:00:47+00:00\",\"dateModified\":\"2019-04-23T11:57:14+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/software-development\/git\/git-commit-amend-example\/\"},\"wordCount\":540,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/#organization\"},\"image\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/software-development\/git\/git-commit-amend-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-commit-amend-example\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/software-development\/git\/git-commit-amend-example\/\",\"url\":\"https:\/\/examples.javacodegeeks.com\/software-development\/git\/git-commit-amend-example\/\",\"name\":\"Git Commit Amend Example - Java Code Geeks\",\"isPartOf\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/software-development\/git\/git-commit-amend-example\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/software-development\/git\/git-commit-amend-example\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2015\/09\/git-logo.jpg\",\"datePublished\":\"2015-10-06T08:00:47+00:00\",\"dateModified\":\"2019-04-23T11:57:14+00:00\",\"description\":\"In the previous post Git \\\"Hello World\\\" Example we learnt some basic steps about Git. In this example,&nbsp;we shall show how to edit commit messages. 1.\",\"breadcrumb\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/software-development\/git\/git-commit-amend-example\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/examples.javacodegeeks.com\/software-development\/git\/git-commit-amend-example\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/software-development\/git\/git-commit-amend-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-commit-amend-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 Commit Amend 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 Commit Amend Example - Java Code Geeks","description":"In the previous post Git \"Hello World\" Example we learnt some basic steps about Git. In this example,&nbsp;we shall show how to edit commit messages. 1.","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-commit-amend-example\/","og_locale":"en_US","og_type":"article","og_title":"Git Commit Amend Example - Java Code Geeks","og_description":"In the previous post Git \"Hello World\" Example we learnt some basic steps about Git. In this example,&nbsp;we shall show how to edit commit messages. 1.","og_url":"https:\/\/examples.javacodegeeks.com\/software-development\/git\/git-commit-amend-example\/","og_site_name":"Examples Java Code Geeks","article_publisher":"https:\/\/www.facebook.com\/javacodegeeks","article_published_time":"2015-10-06T08:00:47+00:00","article_modified_time":"2019-04-23T11:57:14+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":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/examples.javacodegeeks.com\/software-development\/git\/git-commit-amend-example\/#article","isPartOf":{"@id":"https:\/\/examples.javacodegeeks.com\/software-development\/git\/git-commit-amend-example\/"},"author":{"name":"Eddu Melendez","@id":"https:\/\/examples.javacodegeeks.com\/#\/schema\/person\/5f3392b0e6e58390b9565c8ca1680a69"},"headline":"Git Commit Amend Example","datePublished":"2015-10-06T08:00:47+00:00","dateModified":"2019-04-23T11:57:14+00:00","mainEntityOfPage":{"@id":"https:\/\/examples.javacodegeeks.com\/software-development\/git\/git-commit-amend-example\/"},"wordCount":540,"commentCount":0,"publisher":{"@id":"https:\/\/examples.javacodegeeks.com\/#organization"},"image":{"@id":"https:\/\/examples.javacodegeeks.com\/software-development\/git\/git-commit-amend-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-commit-amend-example\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/examples.javacodegeeks.com\/software-development\/git\/git-commit-amend-example\/","url":"https:\/\/examples.javacodegeeks.com\/software-development\/git\/git-commit-amend-example\/","name":"Git Commit Amend Example - Java Code Geeks","isPartOf":{"@id":"https:\/\/examples.javacodegeeks.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/examples.javacodegeeks.com\/software-development\/git\/git-commit-amend-example\/#primaryimage"},"image":{"@id":"https:\/\/examples.javacodegeeks.com\/software-development\/git\/git-commit-amend-example\/#primaryimage"},"thumbnailUrl":"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2015\/09\/git-logo.jpg","datePublished":"2015-10-06T08:00:47+00:00","dateModified":"2019-04-23T11:57:14+00:00","description":"In the previous post Git \"Hello World\" Example we learnt some basic steps about Git. In this example,&nbsp;we shall show how to edit commit messages. 1.","breadcrumb":{"@id":"https:\/\/examples.javacodegeeks.com\/software-development\/git\/git-commit-amend-example\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/examples.javacodegeeks.com\/software-development\/git\/git-commit-amend-example\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/examples.javacodegeeks.com\/software-development\/git\/git-commit-amend-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-commit-amend-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 Commit Amend 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\/27452","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=27452"}],"version-history":[{"count":0,"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/posts\/27452\/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=27452"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/categories?post=27452"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/tags?post=27452"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}