<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>sugiwe</author_name>
  <author_url>https://blog.hatena.ne.jp/sugiwe/</author_url>
  <blog_title>sugiweblog</blog_title>
  <blog_url>https://sugiwe.hatenablog.jp/</blog_url>
  <categories>
    <anon>Git/Github</anon>
  </categories>
  <description>GitHubのリモートリポジトリにプッシュをした後でいくつか作業漏れが発覚して、本来1つのコミットに入れたかった修正内容が複数のコミットに分かれてしまいました。 そのままでも良いケースもあると思いますが、今回は1つに整理しておきたかったので、複数に分かれたコミットを後から1つにまとめるためにgit rebase -iを使いました。 その時のメモです📝 手順 前提として、今回の作業は「直近5つのコミットを1つにまとめる」です。 ローカル まずは手元でコミットを綺麗にする。 git rebase -i HEAD~5を実行、VSCodeのエディタ側で編集画面が開く （VSCodeでコミットメッセージ…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fsugiwe.hatenablog.jp%2Fentry%2Fgit-rebase-i&quot; title=&quot;git rebase -i でコミットの歴史を改変したのでメモ - sugiweblog&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url>https://cdn-ak.f.st-hatena.com/images/fotolife/s/sugiwe/20250513/20250513141844.png</image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2025-05-13 14:44:46</published>
  <title>git rebase -i でコミットの歴史を改変したのでメモ</title>
  <type>rich</type>
  <url>https://sugiwe.hatenablog.jp/entry/git-rebase-i</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
