D:\code\gt>git init
Initialized empty Git repository in D:/code/gt/.git/
D:\code\gt>echo Zero > a
D:\code\gt>git add a
D:\code\gt>git commit -m a
[master (root-commit) 392580e] a
1 files changed, 1 insertions(+), 0 deletions(-)
create mode 100644 a
D:\code\gt>echo One > a
D:\code\gt>git add a
D:\code\gt>git commit -m another
[master 271efba] another
1 files changed, 1 insertions(+), 1 deletions(-)
D:\code\gt>echo Second > a
D:\code\gt>git add a
D:\code\gt>git commit -m "yet another"
[master 8d2041e] yet another
1 files changed, 1 insertions(+), 1 deletions(-)
D:\code\gt>git status
# On branch master
nothing to commit (working directory clean)
D:\code\gt>git checkout 271ef a
D:\code\gt>git status
# On branch master
# Changes to be committed:
# (use "git reset HEAD <file>..." to unstage)
#
# modified: a
#
Как видите, я извлекаю файл в том состоянии, в котором он находился во 2-м коммите. Однако я не понимаю, почему он уже добавлен в индекс. Почему Git не позволяет мне делать добавку?