{"id":209,"date":"2018-07-12T06:26:44","date_gmt":"2018-07-11T21:26:44","guid":{"rendered":"https:\/\/mz-kb.com\/blog\/?p=209"},"modified":"2023-01-23T00:17:29","modified_gmt":"2023-01-22T15:17:29","slug":"git-commit-amend-how-to-cancel","status":"publish","type":"post","link":"https:\/\/mz-kb.com\/blog\/2018\/07\/12\/git-commit-amend-how-to-cancel\/","title":{"rendered":"git commit --amend\u3092\u53d6\u308a\u6d88\u3059or\u30ad\u30e3\u30f3\u30bb\u30eb\u3059\u308b\u65b9\u6cd5"},"content":{"rendered":"<p>\u901a\u5e38\u306egit commit\u306e\u5834\u5408\u3001\u30b3\u30df\u30c3\u30c8\u30e1\u30c3\u30bb\u30fc\u30b8\u3092\u7a7a\u306e\u307e\u307e\u3067\u7d42\u4e86\u3059\u308c\u3070\u30b3\u30df\u30c3\u30c8\u3092\u30ad\u30e3\u30f3\u30bb\u30eb\u3067\u304d\u307e\u3059\u3002<br \/>\n\u3057\u304b\u3057\u3001git commit --amend\uff08\u524d\u306e\u30b3\u30df\u30c3\u30c8\u3078\u4e0a\u66f8\u304d\u8ffd\u52a0\uff09\u306e\u5834\u5408\u306f\u305d\u306e\u307e\u307e\u7d42\u4e86\u3057\u3066\u3082\u30b3\u30df\u30c3\u30c8\u3055\u308c\u3066\u3057\u307e\u3046\u306e\u3067\u3001\u3046\u3063\u304b\u308a\u5b9f\u884c\u3059\u308b\u3068\u30ad\u30e3\u30f3\u30bb\u30eb\u3067\u304d\u306a\u304f\u3066\u56f0\u308a\u307e\u3059\u3002<\/p>\n<p>\u4e0b\u8a18\u306e\u3044\u305a\u308c\u304b\u306e\u65b9\u6cd5\u3092\u4f7f\u3046\u3053\u3068\u3067\u3001git commit --amend\u3092\u30ad\u30e3\u30f3\u30bb\u30eb\u3067\u304d\u307e\u3059\u3002<\/p>\n<h2>\u89e3\u6c7a\u7b561<\/h2>\n<p>git commit --amend\u3092\u884c\u3063\u305f\u5f8c\u306b\u53d6\u308a\u6d88\u3057\u305f\u3044\u5834\u5408\u306b\u306f\u3001\u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3057\u307e\u3059\u3002<\/p>\n<pre>$ git reset --soft HEAD@{1}\n<\/pre>\n<p>\u524d\u56de\u306egit commit --amend\u306e\u5b9f\u884c\u304c\u306a\u304b\u3063\u305f\u3053\u3068\u306b\u306a\u3063\u3066\u304f\u308c\u307e\u3059\u3002<\/p>\n<h2>\u89e3\u6c7a\u7b562<\/h2>\n<p>git commit --amend\u5b9f\u884c\u6642\u306b\u30c6\u30ad\u30b9\u30c8\u30a8\u30c7\u30a3\u30bf\u3067\u30b3\u30df\u30c3\u30c8\u30e1\u30c3\u30bb\u30fc\u30b8\u3092\u5165\u529b\u3059\u308b\u969b\u3001\u3042\u3089\u304b\u3058\u3081\u5165\u529b\u3055\u308c\u3066\u3044\u308b\u30b3\u30df\u30c3\u30c8\u30e1\u30c3\u30bb\u30fc\u30b8\u3092\u524a\u9664\u3057\u3066\u7a7a\u306b\u3057\u3066\u304b\u3089\u4fdd\u5b58\uff06\u7d42\u4e86\u3057\u307e\u3059\u3002<\/p>\n<p>\u3059\u308b\u3068\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306bgit commit --amend\u304c\u30ad\u30e3\u30f3\u30bb\u30eb\u3055\u308c\u3066\u304f\u308c\u307e\u3059\u3002<\/p>\n<pre style=\"margin-bottom: 30px;\">$ git commit --amend\nAborting commit due to empty commit message.<\/pre>\n<p>\u500b\u4eba\u7684\u306b\u306f\u89e3\u6c7a\u7b562\u306e\u65b9\u304c\u6bce\u56de\u30b3\u30de\u30f3\u30c9\u3092\u30b0\u30b0\u3089\u306a\u304f\u3066\u826f\u3044\u306e\u3067\u697d\u304b\u306a\u3068\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u901a\u5e38\u306egit commit\u306e\u5834\u5408\u3001\u30b3\u30df\u30c3\u30c8\u30e1\u30c3\u30bb\u30fc\u30b8\u3092\u7a7a\u306e\u307e\u307e\u3067\u7d42\u4e86\u3059\u308c\u3070\u30b3\u30df\u30c3\u30c8\u3092\u30ad\u30e3\u30f3\u30bb\u30eb\u3067\u304d\u307e\u3059\u3002 \u3057\u304b\u3057\u3001git commit --amend\uff08\u524d\u306e\u30b3\u30df\u30c3\u30c8\u3078\u4e0a\u66f8\u304d\u8ffd\u52a0\uff09\u306e\u5834\u5408\u306f\u305d\u306e\u307e\u307e\u7d42\u4e86\u3057\u3066\u3082\u30b3\u30df\u30c3\u30c8\u3055\u308c\u3066\u3057 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7],"tags":[],"class_list":["post-209","post","type-post","status-publish","format-standard","hentry","category-program"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v17.1 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>git commit -amend\u3092\u53d6\u308a\u6d88\u3059or\u30ad\u30e3\u30f3\u30bb\u30eb\u3059\u308b\u65b9\u6cd5 - \u307e\u3055\u304b\u308d\u3050<\/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:\/\/mz-kb.com\/blog\/2018\/07\/12\/git-commit-amend-how-to-cancel\/\" \/>\n<meta property=\"og:locale\" content=\"ja_JP\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"git commit -amend\u3092\u53d6\u308a\u6d88\u3059or\u30ad\u30e3\u30f3\u30bb\u30eb\u3059\u308b\u65b9\u6cd5 - \u307e\u3055\u304b\u308d\u3050\" \/>\n<meta property=\"og:description\" content=\"\u901a\u5e38\u306egit commit\u306e\u5834\u5408\u3001\u30b3\u30df\u30c3\u30c8\u30e1\u30c3\u30bb\u30fc\u30b8\u3092\u7a7a\u306e\u307e\u307e\u3067\u7d42\u4e86\u3059\u308c\u3070\u30b3\u30df\u30c3\u30c8\u3092\u30ad\u30e3\u30f3\u30bb\u30eb\u3067\u304d\u307e\u3059\u3002 \u3057\u304b\u3057\u3001git commit --amend\uff08\u524d\u306e\u30b3\u30df\u30c3\u30c8\u3078\u4e0a\u66f8\u304d\u8ffd\u52a0\uff09\u306e\u5834\u5408\u306f\u305d\u306e\u307e\u307e\u7d42\u4e86\u3057\u3066\u3082\u30b3\u30df\u30c3\u30c8\u3055\u308c\u3066\u3057 [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/mz-kb.com\/blog\/2018\/07\/12\/git-commit-amend-how-to-cancel\/\" \/>\n<meta property=\"og:site_name\" content=\"\u307e\u3055\u304b\u308d\u3050\" \/>\n<meta property=\"article:published_time\" content=\"2018-07-11T21:26:44+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-01-22T15:17:29+00:00\" \/>\n<meta name=\"twitter:card\" content=\"summary\" \/>\n<meta name=\"twitter:label1\" content=\"\u306b\u3088\u3063\u3066\u66f8\u304b\u308c\u305f\" \/>\n\t<meta name=\"twitter:data1\" content=\"masaka_k\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebSite\",\"@id\":\"https:\/\/mz-kb.com\/blog\/#website\",\"url\":\"https:\/\/mz-kb.com\/blog\/\",\"name\":\"\\u307e\\u3055\\u304b\\u308d\\u3050\",\"description\":\"\\u30d7\\u30ed\\u30b0\\u30e9\\u30e0\\u306e\\u3053\\u3068\\u3001DTM\\u306e\\u3053\\u3068\\u3068\\u304b\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/mz-kb.com\/blog\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"ja\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/mz-kb.com\/blog\/2018\/07\/12\/git-commit-amend-how-to-cancel\/#webpage\",\"url\":\"https:\/\/mz-kb.com\/blog\/2018\/07\/12\/git-commit-amend-how-to-cancel\/\",\"name\":\"git commit -amend\\u3092\\u53d6\\u308a\\u6d88\\u3059or\\u30ad\\u30e3\\u30f3\\u30bb\\u30eb\\u3059\\u308b\\u65b9\\u6cd5 - \\u307e\\u3055\\u304b\\u308d\\u3050\",\"isPartOf\":{\"@id\":\"https:\/\/mz-kb.com\/blog\/#website\"},\"datePublished\":\"2018-07-11T21:26:44+00:00\",\"dateModified\":\"2023-01-22T15:17:29+00:00\",\"author\":{\"@id\":\"https:\/\/mz-kb.com\/blog\/#\/schema\/person\/d8d66574f0d35fed1c24e8422ab2eabe\"},\"breadcrumb\":{\"@id\":\"https:\/\/mz-kb.com\/blog\/2018\/07\/12\/git-commit-amend-how-to-cancel\/#breadcrumb\"},\"inLanguage\":\"ja\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/mz-kb.com\/blog\/2018\/07\/12\/git-commit-amend-how-to-cancel\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/mz-kb.com\/blog\/2018\/07\/12\/git-commit-amend-how-to-cancel\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\\u30db\\u30fc\\u30e0\",\"item\":\"https:\/\/mz-kb.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"git commit --amend\\u3092\\u53d6\\u308a\\u6d88\\u3059or\\u30ad\\u30e3\\u30f3\\u30bb\\u30eb\\u3059\\u308b\\u65b9\\u6cd5\"}]},{\"@type\":\"Person\",\"@id\":\"https:\/\/mz-kb.com\/blog\/#\/schema\/person\/d8d66574f0d35fed1c24e8422ab2eabe\",\"name\":\"masaka_k\",\"url\":\"https:\/\/mz-kb.com\/blog\/author\/masaka_k\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"git commit -amend\u3092\u53d6\u308a\u6d88\u3059or\u30ad\u30e3\u30f3\u30bb\u30eb\u3059\u308b\u65b9\u6cd5 - \u307e\u3055\u304b\u308d\u3050","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:\/\/mz-kb.com\/blog\/2018\/07\/12\/git-commit-amend-how-to-cancel\/","og_locale":"ja_JP","og_type":"article","og_title":"git commit -amend\u3092\u53d6\u308a\u6d88\u3059or\u30ad\u30e3\u30f3\u30bb\u30eb\u3059\u308b\u65b9\u6cd5 - \u307e\u3055\u304b\u308d\u3050","og_description":"\u901a\u5e38\u306egit commit\u306e\u5834\u5408\u3001\u30b3\u30df\u30c3\u30c8\u30e1\u30c3\u30bb\u30fc\u30b8\u3092\u7a7a\u306e\u307e\u307e\u3067\u7d42\u4e86\u3059\u308c\u3070\u30b3\u30df\u30c3\u30c8\u3092\u30ad\u30e3\u30f3\u30bb\u30eb\u3067\u304d\u307e\u3059\u3002 \u3057\u304b\u3057\u3001git commit --amend\uff08\u524d\u306e\u30b3\u30df\u30c3\u30c8\u3078\u4e0a\u66f8\u304d\u8ffd\u52a0\uff09\u306e\u5834\u5408\u306f\u305d\u306e\u307e\u307e\u7d42\u4e86\u3057\u3066\u3082\u30b3\u30df\u30c3\u30c8\u3055\u308c\u3066\u3057 [&hellip;]","og_url":"https:\/\/mz-kb.com\/blog\/2018\/07\/12\/git-commit-amend-how-to-cancel\/","og_site_name":"\u307e\u3055\u304b\u308d\u3050","article_published_time":"2018-07-11T21:26:44+00:00","article_modified_time":"2023-01-22T15:17:29+00:00","twitter_card":"summary","twitter_misc":{"\u306b\u3088\u3063\u3066\u66f8\u304b\u308c\u305f":"masaka_k"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebSite","@id":"https:\/\/mz-kb.com\/blog\/#website","url":"https:\/\/mz-kb.com\/blog\/","name":"\u307e\u3055\u304b\u308d\u3050","description":"\u30d7\u30ed\u30b0\u30e9\u30e0\u306e\u3053\u3068\u3001DTM\u306e\u3053\u3068\u3068\u304b","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/mz-kb.com\/blog\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"ja"},{"@type":"WebPage","@id":"https:\/\/mz-kb.com\/blog\/2018\/07\/12\/git-commit-amend-how-to-cancel\/#webpage","url":"https:\/\/mz-kb.com\/blog\/2018\/07\/12\/git-commit-amend-how-to-cancel\/","name":"git commit -amend\u3092\u53d6\u308a\u6d88\u3059or\u30ad\u30e3\u30f3\u30bb\u30eb\u3059\u308b\u65b9\u6cd5 - \u307e\u3055\u304b\u308d\u3050","isPartOf":{"@id":"https:\/\/mz-kb.com\/blog\/#website"},"datePublished":"2018-07-11T21:26:44+00:00","dateModified":"2023-01-22T15:17:29+00:00","author":{"@id":"https:\/\/mz-kb.com\/blog\/#\/schema\/person\/d8d66574f0d35fed1c24e8422ab2eabe"},"breadcrumb":{"@id":"https:\/\/mz-kb.com\/blog\/2018\/07\/12\/git-commit-amend-how-to-cancel\/#breadcrumb"},"inLanguage":"ja","potentialAction":[{"@type":"ReadAction","target":["https:\/\/mz-kb.com\/blog\/2018\/07\/12\/git-commit-amend-how-to-cancel\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/mz-kb.com\/blog\/2018\/07\/12\/git-commit-amend-how-to-cancel\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u30db\u30fc\u30e0","item":"https:\/\/mz-kb.com\/blog\/"},{"@type":"ListItem","position":2,"name":"git commit --amend\u3092\u53d6\u308a\u6d88\u3059or\u30ad\u30e3\u30f3\u30bb\u30eb\u3059\u308b\u65b9\u6cd5"}]},{"@type":"Person","@id":"https:\/\/mz-kb.com\/blog\/#\/schema\/person\/d8d66574f0d35fed1c24e8422ab2eabe","name":"masaka_k","url":"https:\/\/mz-kb.com\/blog\/author\/masaka_k\/"}]}},"_links":{"self":[{"href":"https:\/\/mz-kb.com\/blog\/wp-json\/wp\/v2\/posts\/209","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mz-kb.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mz-kb.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mz-kb.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mz-kb.com\/blog\/wp-json\/wp\/v2\/comments?post=209"}],"version-history":[{"count":22,"href":"https:\/\/mz-kb.com\/blog\/wp-json\/wp\/v2\/posts\/209\/revisions"}],"predecessor-version":[{"id":523,"href":"https:\/\/mz-kb.com\/blog\/wp-json\/wp\/v2\/posts\/209\/revisions\/523"}],"wp:attachment":[{"href":"https:\/\/mz-kb.com\/blog\/wp-json\/wp\/v2\/media?parent=209"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mz-kb.com\/blog\/wp-json\/wp\/v2\/categories?post=209"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mz-kb.com\/blog\/wp-json\/wp\/v2\/tags?post=209"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}