• git update-index

    git update-index

    将工作区的文件加入缓存区域。

    1. $ git update-index --add --cacheinfo \
    2. 100644 5c1b14949828006ed75a3e8858957f86a2f7e2eb hola.txt

    直接将缓存信息插入缓存文件。