<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>tkmrtech</author_name>
  <author_url>https://blog.hatena.ne.jp/tkmrtech/</author_url>
  <blog_title>WEB系エンジニア志望のメモ</blog_title>
  <blog_url>https://tkmrtech.hateblo.jp/</blog_url>
  <categories>
    <anon>Git</anon>
    <anon>rails</anon>
  </categories>
  <description>本来、環境変数として設定してプッシュしなければいけなかったファイルを誤ってプッシュしてしまったときなど、そのファイルの履歴はずっと残ってしまうので、APIのKeyやらが全世界に公開されてしまいます。 先日その過ちを消すことに成功したのでメモ。 まず初めに、現時点でのバックアップをローカルに保存する。 これは履歴を消すと言ってもファイル自体が一旦消えてしまうので、その対策。 ローカルで以下のコマンドを。 git filter-branch -f --index-filter 'git rm --ignore-unmatch ファイル名' HEAD ファイル名が複数あるときはその回数分これを繰り返…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Ftkmrtech.hateblo.jp%2Fentry%2F2019%2F10%2F22%2F201750&quot; title=&quot;Githubから特定のファイルの履歴を消すメモ - WEB系エンジニア志望のメモ&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>2019-10-22 20:17:50</published>
  <title>Githubから特定のファイルの履歴を消すメモ</title>
  <type>rich</type>
  <url>https://tkmrtech.hateblo.jp/entry/2019/10/22/201750</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
