回答編集履歴

1

追加質問への回答

2016/01/07 15:56

投稿

退会済みユーザー
answer CHANGED
@@ -6,4 +6,13 @@
6
6
  これに伴いコマンド実行後のワーキングツリーの状態も差異が出ます。
7
7
 
8
8
  こちらもどうぞ:
9
- - [【git】[作業ブランチでresetしたとき](22007)|teratail](https://teratail.com/questions/22007)
9
+ - [【git】[作業ブランチでresetしたとき](22007)|teratail](https://teratail.com/questions/22007)
10
+
11
+ -------
12
+
13
+ `git checkout .`は、[man](https://git-scm.com/docs/git-checkout)にある
14
+ > **__git checkout [-p|--patch] [<tree-ish>] [--] <pathspec>…__​**
15
+ When <paths> or --patch are given, git checkout does **not** switch branches. It updates the named paths in the working tree from the index file or from a named <tree-ish> (most often a commit).
16
+
17
+ の形で、pathに.(ドット、すなわちカレントディレクトリ)を指定し、<tree-ish>を明示しない(__If not specified, the index will be used__)ものです。
18
+ つまり、カレントディレクトリ以下をindexの状態に更新する、の意です。