gitリポジトリに間違って追加してしまったファイル等を完全に消去する方法を紹介します。

pre>>
% git filter-branch -f --index-filter 'git update-index --remove "filename"' HEAD
% git push --force
<<--

ディレクトリを削除したい場合は、ディレクトリの中身のファイルを1つずつ全て削除します。

ポイント

  • 上記のコマンドはワーキングディレクトリのROOTで実行する必要があります。
  • "filename"はワーキングディレクトリのROOTからの相対パスで記述します。
  • "-f" オプションはつけておいた方が良いです。
posted by genki genki on Sun 30 Aug 2009 at 08:44 with 0 comments
Contents rssrss
光ファイバーを二次元振動させて走査するAR用ディスプレイ
因果の取り違え
Swift2's defer for CoffeeScript
mongodb-3.0からcreateIndexのdropDupsが無くなったらしい
mongodb-3.0以降のWiredTigerの設定を動的に変更する方法
一般楕円の高速生成アルゴリズムへの道標
farro mantecatoのレシピ
Droonga関連の記事のまとめ
RuntimeErrorの特定のメッセージに限定してrescueする方法
jQueryでscriptタグを実行せずにappendする
Tags
coffeescriptdefergroongajsmemonodenodejs
Comments rssrss
https://rich-house.su/about/ https://rich-house.su/about/: улица Луначарского д https://rich-house.su/photos/... 04/18 22:41
https://tlc-alliance.ru/ https://tlc-alliance.ru/: Нам нужно привезти партию электроники из Шэньчжэ... 04/18 22:24
https://dostavka-izkitaya5.ru/ https://dostavka-izkitaya5.ru/: В 2026 году без нормальной растаможки на маркетпле... 04/18 21:47
https://www.oyeanuncios.com/profile/margueritecava https://www.oyeanuncios.com/profile/margueritecava: Hat jemand Tipps gegen die leichte Übelkeit in der... 04/17 23:02
https://athworldproperties.com/author/deangelonewhou/ https://athworldproperties.com/author/deangelonewhou/: Mein Stoffwechsel fühlt sich zum ersten Mal seit J... 04/17 23:00
https://hyperharmony.com/author-profile/shannaminifie/ https://hyperharmony.com/author-profile/shannaminifie/: Endlich ist dieses ständige „Food Noise“ im Kopf k... 04/17 22:49
https://www.legnostyle.ru/catalog/mebel/spalni/sp-3.html https://www.legnostyle.ru/catalog/mebel/spalni/sp-3.html: Мебель из Германии славится на весь мир своими изы... 04/16 15:20
https://slon8.at-slon6.cc https://slon8.at-slon6.cc: Superb, what a webpage it is! This weblog presents... 04/15 21:27