Книга говорит
The Git index is used as a staging area between your working directory and your repository. You can use the index to build up a set of changes that you want to commit together. When you create a commit, what is committed is what is currently in the index, not what is in your working directory.
тоесть ниже у меня индекс пустой
vv@crusader ~/work/own/python/config_tool/my_confman/configs $ ls -l
total 8
-rw-r--r-- 1 vv vv 2 січ  1 13:58 1
-rw-r--r-- 1 vv vv 2 січ  1 13:58 2
vv@crusader ~/work/own/python/config_tool/my_confman/configs $ gt status
# On branch tee
nothing to commit (working directory clean)
vv@crusader ~/work/own/python/config_tool/my_confman/configs $
но следующий «скрипт»
..
    index = repository.index
    # lets check if index is empty
    #print dir(index)
    #pprint (vars(index))
    #print index[0]
    print len(index)
    print index['1']
    print index['2']
..
выдает немного не те результаты
vv@crusader ~/work/own/python/config_tool/my_confman/configs $ !p
python ../confman
2
<pygit2.IndexEntry object at 0xb746e0f0>
<pygit2.IndexEntry object at 0xb746e0f0>
vv@crusader ~/work/own/python/config_tool/my_confman/configs $
wtf?



