Is the Git staging area just an index?

后端 未结 5 2013
小鲜肉
小鲜肉 2021-02-07 00:01

The book Pro Git says that the staging area is just a list, or index, that says which files will be committed when a git commit is done, and now the name inde

5条回答
  •  轻奢々
    轻奢々 (楼主)
    2021-02-07 00:53

    Index is a view of your working directory that is ready for commit. It can be seen as a pre-commit state and is not as simple as a "list of files". When you do git add, the file (with the change) is added to the index and the newer changes will not be see until you add them too.

提交回复
热议问题