422
267

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 add を取り消す

Last updated at Posted at 2019-03-03

はじめてのgit add を取り消す

git init 直後のgit addを取り消したい場合。

全てのファイルを取り消し
git rm --cached -r .
特定のファイルのみ取り消し
git rm --cached -r file_name

2回目以降のgit add を取り消す

全てのファイルを取り消し
git reset HEAD
特定のファイルのみ取り消し
git reset HEAD file_name
422
267
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
422
267

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?