<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>sutara_lumpur</author_name>
  <author_url>https://blog.hatena.ne.jp/sutara_lumpur/</author_url>
  <blog_title>すたらブログ</blog_title>
  <blog_url>https://sutara79.hatenablog.com/</blog_url>
  <categories>
    <anon>git</anon>
  </categories>
  <description>要望 Gitで管理する前に作成していた古いソースコードを、Gitでの管理を始めたバージョンよりも前のコミット履歴に挿入したい。 あたかも、古いソースコードも初めからGitで管理していたかのように見せたい。 解決策 git rebase -iを使ってコミット履歴の順番を入れ替えます。 参考: gitのコミットの歴史を改変する(git rebase) 2 / 2 - けんごのお屋敷 手順 1. 古いソースコードをコミットする まず、古いソースコードをそのままコミットします。 履歴は下記のようになります。 $ git log --oneline c2c2028 過去に挿入したいコミット 38ecb3…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fsutara79.hatenablog.com%2Fentry%2F2015%2F07%2F28%2F134629&quot; title=&quot;Git: コミット履歴の順番を変えたい - すたらブログ&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></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2015-07-28 13:46:29</published>
  <title>Git: コミット履歴の順番を変えたい</title>
  <type>rich</type>
  <url>https://sutara79.hatenablog.com/entry/2015/07/28/134629</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
