0
0

More than 1 year has passed since last update.

取消し・削除系のGitコマンドが、ワークツリー・インデックス・HEADのいずれに作用するか

Posted at

Gitの取消し・削除系のコマンドが、ワークツリー・インデックス・HEADのいずれに作用するかをまとめました。

# コマンド ワークツリー インデックス HEAD
1 git checkout . - -
2 git rm [file] -
3 git rm [file] --cached - -
4 git reset --soft HEAD^ - -
5 git reset --mixed HEAD^ -
6 git reset --hard HEAD^
7 git restore --worktree file - -
8 git restore --staged file - -
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