0
0

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.

[Git]Cheat Sheet

Posted at

目次

1. ローカルレポジトリをリモートレポジトリの時点まで全て戻す

$ git reset --hard origin/master

2. .gitignoreを書き忘れた際にgit管理対象から外す

--cachedオプションを付けることにより、ファイルを残したまま管理対象から外すことが可能

  • ファイルの場合
git rm --cached [削除したいファイル]
  • ディレクトリの場合
git rm -r --cached [削除したいディレクトリ]
0
0
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
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?