{"id":176204,"date":"2019-08-14T09:45:56","date_gmt":"2019-08-14T09:45:56","guid":{"rendered":"https:\/\/webkul.com\/blog\/?p=176204"},"modified":"2023-02-14T12:59:47","modified_gmt":"2023-02-14T12:59:47","slug":"how-to-squash-multiple-git-commits","status":"publish","type":"post","link":"https:\/\/webkul.com\/blog\/how-to-squash-multiple-git-commits\/","title":{"rendered":"How to squash multiple git commits"},"content":{"rendered":"\n<p>Today in this blog I&#8217;ll explain how to squash related commits into one commit. Before how let&#8217;s see what we mean by squashing git commit. As the name suggests it means combining multiple commits. <\/p>\n\n\n\n<p>Let&#8217;s suppose, there are multiple pushed commits for a single issue or a feature. Then we can squash those multiple commits into one for better management. <\/p>\n\n\n\n<p>For example, I&#8217;ll show how to squash two commits into one.  I have created a demo repo. I have done two commits &#8220;<em>first commit<\/em>&#8221; and &#8220;<em>second commit<\/em>&#8221; as you can see below,<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"822\" height=\"383\" src=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2019\/08\/Screenshot-from-2023-02-14-17-27-13-1.png\" alt=\"initial two commits\" class=\"wp-image-368810\" srcset=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2019\/08\/Screenshot-from-2023-02-14-17-27-13-1.png 822w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2019\/08\/Screenshot-from-2023-02-14-17-27-13-1-300x140.png 300w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2019\/08\/Screenshot-from-2023-02-14-17-27-13-1-250x116.png 250w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2019\/08\/Screenshot-from-2023-02-14-17-27-13-1-768x358.png 768w\" sizes=\"(max-width: 822px) 100vw, 822px\" loading=\"lazy\" \/><\/figure>\n\n\n\n<p>Now the goal is to combine these two commits into one commit.<\/p>\n\n\n\n<p class=\"has-medium-font-size\">To do this run <strong><code class=\"has-vivid-cyan-blue-color\">git rebase -i HEAD~2<\/code><\/strong> here we have used 2 because we are squashing two commits. You should use the number of commits you want to squash. It can be any number. After running this it will open up editor, there you will see the last two commits that you are wanting to squash as shown below,<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"1163\" height=\"544\" src=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2019\/08\/Screenshot-from-2023-02-14-17-29-32.png\" alt=\"review rebase\" class=\"wp-image-368811\" srcset=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2019\/08\/Screenshot-from-2023-02-14-17-29-32.png 1163w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2019\/08\/Screenshot-from-2023-02-14-17-29-32-300x140.png 300w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2019\/08\/Screenshot-from-2023-02-14-17-29-32-250x117.png 250w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2019\/08\/Screenshot-from-2023-02-14-17-29-32-768x359.png 768w\" sizes=\"(max-width: 1163px) 100vw, 1163px\" loading=\"lazy\" \/><\/figure>\n\n\n\n<p>Now change the <strong>&#8220;pick&#8221;<\/strong> to <strong>&#8220;squash&#8221;<\/strong> in front of all the commits that you want to squash so in here I&#8217;ll change the second one to <strong>&#8220;squash&#8221;<\/strong>  as shown below,<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2019\/08\/Screenshot-from-2023-02-14-17-28-04.png\"><img decoding=\"async\" width=\"711\" height=\"565\" src=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2019\/08\/Screenshot-from-2023-02-14-17-28-04.png\" alt=\"relace pick with squash\" class=\"wp-image-368812\" srcset=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2019\/08\/Screenshot-from-2023-02-14-17-28-04.png 711w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2019\/08\/Screenshot-from-2023-02-14-17-28-04-300x238.png 300w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2019\/08\/Screenshot-from-2023-02-14-17-28-04-250x199.png 250w\" sizes=\"(max-width: 711px) 100vw, 711px\" loading=\"lazy\" \/><\/a><\/figure>\n\n\n\n<p>After that, we will save it and it will open another file in the editor to manage the commit message as shown here,<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"718\" height=\"482\" src=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2019\/08\/Screenshot-from-2023-02-14-17-31-47.png\" alt=\"review commit message\" class=\"wp-image-368813\" srcset=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2019\/08\/Screenshot-from-2023-02-14-17-31-47.png 718w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2019\/08\/Screenshot-from-2023-02-14-17-31-47-300x201.png 300w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2019\/08\/Screenshot-from-2023-02-14-17-31-47-250x168.png 250w\" sizes=\"(max-width: 718px) 100vw, 718px\" loading=\"lazy\" \/><\/figure>\n\n\n\n<p>Now you can remove the previous messages and add some new messages,<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"874\" height=\"477\" src=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2019\/08\/Screenshot-from-2023-02-14-17-32-04.png\" alt=\"new commit message\" class=\"wp-image-368814\" srcset=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2019\/08\/Screenshot-from-2023-02-14-17-32-04.png 874w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2019\/08\/Screenshot-from-2023-02-14-17-32-04-300x164.png 300w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2019\/08\/Screenshot-from-2023-02-14-17-32-04-250x136.png 250w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2019\/08\/Screenshot-from-2023-02-14-17-32-04-768x419.png 768w\" sizes=\"(max-width: 874px) 100vw, 874px\" loading=\"lazy\" \/><\/figure>\n\n\n\n<p>After that, you will get a success message on the terminal,<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"603\" height=\"156\" src=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2019\/08\/Screenshot-from-2023-02-14-17-32-23.png\" alt=\"success message\" class=\"wp-image-368815\" srcset=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2019\/08\/Screenshot-from-2023-02-14-17-32-23.png 603w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2019\/08\/Screenshot-from-2023-02-14-17-32-23-300x78.png 300w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2019\/08\/Screenshot-from-2023-02-14-17-32-23-250x65.png 250w\" sizes=\"(max-width: 603px) 100vw, 603px\" loading=\"lazy\" \/><\/figure>\n\n\n\n<p class=\"has-medium-font-size\">Now we have to push it forcefully, to do that run <strong><code class=\"has-vivid-cyan-blue-color\">git push -f origin squashtest<\/code><\/strong> <\/p>\n\n\n\n<p>As you can see below the previous two commits have been replaced with the new commit,<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"863\" height=\"171\" src=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2019\/08\/Screenshot-from-2023-02-14-17-33-16.png\" alt=\"changed commit\" class=\"wp-image-368816\" srcset=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2019\/08\/Screenshot-from-2023-02-14-17-33-16.png 863w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2019\/08\/Screenshot-from-2023-02-14-17-33-16-300x59.png 300w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2019\/08\/Screenshot-from-2023-02-14-17-33-16-250x50.png 250w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2019\/08\/Screenshot-from-2023-02-14-17-33-16-768x152.png 768w\" sizes=\"(max-width: 863px) 100vw, 863px\" loading=\"lazy\" \/><\/figure>\n\n\n\n<p>Thanks for reading. Feel free to comment if you face any issue.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Today in this blog I&#8217;ll explain how to squash related commits into one commit. Before how let&#8217;s see what we mean by squashing git commit. As the name suggests it means combining multiple commits. Let&#8217;s suppose, there are multiple pushed commits for a single issue or a feature. Then we can squash those multiple commits <a href=\"https:\/\/webkul.com\/blog\/how-to-squash-multiple-git-commits\/\">[&#8230;]<\/a><\/p>\n","protected":false},"author":201,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[9557,9556],"class_list":["post-176204","post","type-post","status-publish","format-standard","hentry","category-uncategorized","tag-combine-multiple-git-commits","tag-squash-git-commits"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v24.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How to squash multiple git commits - Webkul Blog<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/webkul.com\/blog\/how-to-squash-multiple-git-commits\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to squash multiple git commits - Webkul Blog\" \/>\n<meta property=\"og:description\" content=\"Today in this blog I&#8217;ll explain how to squash related commits into one commit. Before how let&#8217;s see what we mean by squashing git commit. As the name suggests it means combining multiple commits. Let&#8217;s suppose, there are multiple pushed commits for a single issue or a feature. Then we can squash those multiple commits [...]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/webkul.com\/blog\/how-to-squash-multiple-git-commits\/\" \/>\n<meta property=\"og:site_name\" content=\"Webkul Blog\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/webkul\/\" \/>\n<meta property=\"article:published_time\" content=\"2019-08-14T09:45:56+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-02-14T12:59:47+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/webkul.com\/blog\/wp-content\/uploads\/2019\/08\/Screenshot-from-2023-02-14-17-27-13-1.png\" \/>\n<meta name=\"author\" content=\"Sanjay Chouhan\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@webkul\" \/>\n<meta name=\"twitter:site\" content=\"@webkul\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Sanjay Chouhan\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/webkul.com\/blog\/how-to-squash-multiple-git-commits\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/webkul.com\/blog\/how-to-squash-multiple-git-commits\/\"},\"author\":{\"name\":\"Sanjay Chouhan\",\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/person\/645580979f637b0e355deea21bd07462\"},\"headline\":\"How to squash multiple git commits\",\"datePublished\":\"2019-08-14T09:45:56+00:00\",\"dateModified\":\"2023-02-14T12:59:47+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/webkul.com\/blog\/how-to-squash-multiple-git-commits\/\"},\"wordCount\":280,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/webkul.com\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/webkul.com\/blog\/how-to-squash-multiple-git-commits\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/webkul.com\/blog\/wp-content\/uploads\/2019\/08\/Screenshot-from-2023-02-14-17-27-13-1.png\",\"keywords\":[\"combine multiple git commits\",\"squash git commits\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/webkul.com\/blog\/how-to-squash-multiple-git-commits\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/webkul.com\/blog\/how-to-squash-multiple-git-commits\/\",\"url\":\"https:\/\/webkul.com\/blog\/how-to-squash-multiple-git-commits\/\",\"name\":\"How to squash multiple git commits - Webkul Blog\",\"isPartOf\":{\"@id\":\"https:\/\/webkul.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/webkul.com\/blog\/how-to-squash-multiple-git-commits\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/webkul.com\/blog\/how-to-squash-multiple-git-commits\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/webkul.com\/blog\/wp-content\/uploads\/2019\/08\/Screenshot-from-2023-02-14-17-27-13-1.png\",\"datePublished\":\"2019-08-14T09:45:56+00:00\",\"dateModified\":\"2023-02-14T12:59:47+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/webkul.com\/blog\/how-to-squash-multiple-git-commits\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/webkul.com\/blog\/how-to-squash-multiple-git-commits\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/webkul.com\/blog\/how-to-squash-multiple-git-commits\/#primaryimage\",\"url\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2019\/08\/Screenshot-from-2023-02-14-17-27-13-1.png\",\"contentUrl\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2019\/08\/Screenshot-from-2023-02-14-17-27-13-1.png\",\"width\":822,\"height\":383,\"caption\":\"initial two commits\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/webkul.com\/blog\/how-to-squash-multiple-git-commits\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/webkul.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to squash multiple git commits\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/webkul.com\/blog\/#website\",\"url\":\"https:\/\/webkul.com\/blog\/\",\"name\":\"Webkul Blog\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/webkul.com\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/webkul.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/webkul.com\/blog\/#organization\",\"name\":\"WebKul Software Private Limited\",\"url\":\"https:\/\/webkul.com\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/08\/webkul-logo-accent-sq.png\",\"contentUrl\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/08\/webkul-logo-accent-sq.png\",\"width\":380,\"height\":380,\"caption\":\"WebKul Software Private Limited\"},\"image\":{\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/webkul\/\",\"https:\/\/x.com\/webkul\",\"https:\/\/www.instagram.com\/webkul\/\",\"https:\/\/www.linkedin.com\/company\/webkul\",\"https:\/\/www.youtube.com\/user\/webkul\/\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/person\/645580979f637b0e355deea21bd07462\",\"name\":\"Sanjay Chouhan\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/cd6ee19f99bd1fcafef819135529c952d7c875d06fedd9fd4c4eb0996bafc1bd?s=96&d=https%3A%2F%2Fcdnblog.webkul.com%2Fblog%2Fwp-content%2Fuploads%2F2019%2F10%2Fmike.png&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/cd6ee19f99bd1fcafef819135529c952d7c875d06fedd9fd4c4eb0996bafc1bd?s=96&d=https%3A%2F%2Fcdnblog.webkul.com%2Fblog%2Fwp-content%2Fuploads%2F2019%2F10%2Fmike.png&r=g\",\"caption\":\"Sanjay Chouhan\"},\"sameAs\":[\"https:\/\/www.instagram.com\/sanjaychouhansc\/\",\"https:\/\/in.linkedin.com\/in\/scchouhansanjay\"],\"url\":\"https:\/\/webkul.com\/blog\/author\/sanjay-chouhan180\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to squash multiple git commits - Webkul Blog","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:\/\/webkul.com\/blog\/how-to-squash-multiple-git-commits\/","og_locale":"en_US","og_type":"article","og_title":"How to squash multiple git commits - Webkul Blog","og_description":"Today in this blog I&#8217;ll explain how to squash related commits into one commit. Before how let&#8217;s see what we mean by squashing git commit. As the name suggests it means combining multiple commits. Let&#8217;s suppose, there are multiple pushed commits for a single issue or a feature. Then we can squash those multiple commits [...]","og_url":"https:\/\/webkul.com\/blog\/how-to-squash-multiple-git-commits\/","og_site_name":"Webkul Blog","article_publisher":"https:\/\/www.facebook.com\/webkul\/","article_published_time":"2019-08-14T09:45:56+00:00","article_modified_time":"2023-02-14T12:59:47+00:00","og_image":[{"url":"https:\/\/webkul.com\/blog\/wp-content\/uploads\/2019\/08\/Screenshot-from-2023-02-14-17-27-13-1.png","type":"","width":"","height":""}],"author":"Sanjay Chouhan","twitter_card":"summary_large_image","twitter_creator":"@webkul","twitter_site":"@webkul","twitter_misc":{"Written by":"Sanjay Chouhan","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/webkul.com\/blog\/how-to-squash-multiple-git-commits\/#article","isPartOf":{"@id":"https:\/\/webkul.com\/blog\/how-to-squash-multiple-git-commits\/"},"author":{"name":"Sanjay Chouhan","@id":"https:\/\/webkul.com\/blog\/#\/schema\/person\/645580979f637b0e355deea21bd07462"},"headline":"How to squash multiple git commits","datePublished":"2019-08-14T09:45:56+00:00","dateModified":"2023-02-14T12:59:47+00:00","mainEntityOfPage":{"@id":"https:\/\/webkul.com\/blog\/how-to-squash-multiple-git-commits\/"},"wordCount":280,"commentCount":0,"publisher":{"@id":"https:\/\/webkul.com\/blog\/#organization"},"image":{"@id":"https:\/\/webkul.com\/blog\/how-to-squash-multiple-git-commits\/#primaryimage"},"thumbnailUrl":"https:\/\/webkul.com\/blog\/wp-content\/uploads\/2019\/08\/Screenshot-from-2023-02-14-17-27-13-1.png","keywords":["combine multiple git commits","squash git commits"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/webkul.com\/blog\/how-to-squash-multiple-git-commits\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/webkul.com\/blog\/how-to-squash-multiple-git-commits\/","url":"https:\/\/webkul.com\/blog\/how-to-squash-multiple-git-commits\/","name":"How to squash multiple git commits - Webkul Blog","isPartOf":{"@id":"https:\/\/webkul.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/webkul.com\/blog\/how-to-squash-multiple-git-commits\/#primaryimage"},"image":{"@id":"https:\/\/webkul.com\/blog\/how-to-squash-multiple-git-commits\/#primaryimage"},"thumbnailUrl":"https:\/\/webkul.com\/blog\/wp-content\/uploads\/2019\/08\/Screenshot-from-2023-02-14-17-27-13-1.png","datePublished":"2019-08-14T09:45:56+00:00","dateModified":"2023-02-14T12:59:47+00:00","breadcrumb":{"@id":"https:\/\/webkul.com\/blog\/how-to-squash-multiple-git-commits\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/webkul.com\/blog\/how-to-squash-multiple-git-commits\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/webkul.com\/blog\/how-to-squash-multiple-git-commits\/#primaryimage","url":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2019\/08\/Screenshot-from-2023-02-14-17-27-13-1.png","contentUrl":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2019\/08\/Screenshot-from-2023-02-14-17-27-13-1.png","width":822,"height":383,"caption":"initial two commits"},{"@type":"BreadcrumbList","@id":"https:\/\/webkul.com\/blog\/how-to-squash-multiple-git-commits\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/webkul.com\/blog\/"},{"@type":"ListItem","position":2,"name":"How to squash multiple git commits"}]},{"@type":"WebSite","@id":"https:\/\/webkul.com\/blog\/#website","url":"https:\/\/webkul.com\/blog\/","name":"Webkul Blog","description":"","publisher":{"@id":"https:\/\/webkul.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/webkul.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/webkul.com\/blog\/#organization","name":"WebKul Software Private Limited","url":"https:\/\/webkul.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/webkul.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/08\/webkul-logo-accent-sq.png","contentUrl":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/08\/webkul-logo-accent-sq.png","width":380,"height":380,"caption":"WebKul Software Private Limited"},"image":{"@id":"https:\/\/webkul.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/webkul\/","https:\/\/x.com\/webkul","https:\/\/www.instagram.com\/webkul\/","https:\/\/www.linkedin.com\/company\/webkul","https:\/\/www.youtube.com\/user\/webkul\/"]},{"@type":"Person","@id":"https:\/\/webkul.com\/blog\/#\/schema\/person\/645580979f637b0e355deea21bd07462","name":"Sanjay Chouhan","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/webkul.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/cd6ee19f99bd1fcafef819135529c952d7c875d06fedd9fd4c4eb0996bafc1bd?s=96&d=https%3A%2F%2Fcdnblog.webkul.com%2Fblog%2Fwp-content%2Fuploads%2F2019%2F10%2Fmike.png&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/cd6ee19f99bd1fcafef819135529c952d7c875d06fedd9fd4c4eb0996bafc1bd?s=96&d=https%3A%2F%2Fcdnblog.webkul.com%2Fblog%2Fwp-content%2Fuploads%2F2019%2F10%2Fmike.png&r=g","caption":"Sanjay Chouhan"},"sameAs":["https:\/\/www.instagram.com\/sanjaychouhansc\/","https:\/\/in.linkedin.com\/in\/scchouhansanjay"],"url":"https:\/\/webkul.com\/blog\/author\/sanjay-chouhan180\/"}]}},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts\/176204","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/users\/201"}],"replies":[{"embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/comments?post=176204"}],"version-history":[{"count":7,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts\/176204\/revisions"}],"predecessor-version":[{"id":368817,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts\/176204\/revisions\/368817"}],"wp:attachment":[{"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/media?parent=176204"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/categories?post=176204"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/tags?post=176204"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}