5
4

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

githubに間違ってpushしてしまった時の特定のファイル削除法

5
Last updated at Posted at 2017-10-09

git filter-branch -f --index-filter 'git rm --ignore-unmatch ファイル名' HEAD

コミット履歴から削除したいファイル名の指定。

git push --force origin master

このコマンドで削除したいファイルを指定していけば、github上の指定ファイルだけコミット履歴から消えます。便利。助かった。

5
4
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
5
4

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?