--- Title: gitの履歴を一旦全部なかったことにする方法 Author: hiro_y Web: 'https://mimemo.io/m/eQDXzla05JoPvwk' --- gitで納品とかで、履歴を残したくない場合などに。 - `.git` ディレクトリーを削除 - メタデータごとさようなら - または、以下のコマンドを連続で打っていく ```bash git checkout --orphan tmp git commit -m "first commit" git checkout -B master git branch -d tmp ``` コマンドの方だと`git remote`の設定は残るので、適宜書き換え。