What does the git index contain EXACTLY?

后端 未结 6 1363
谎友^
谎友^ 2020-11-22 17:28

What does the Git index exactly contain, and what command can I use to view the content of the index?


Update

Thanks for all your answe

6条回答
  •  遥遥无期
    2020-11-22 17:53

    The Git index is 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 this index, not what is in your working directory.

    To see what is inside the index, issue the command:

    git status
    

    When you run git status, you can see which files are staged (currently in your index), which are modified but not yet staged, and which are completely untracked.

    You can read this. A Google search throws up many links, which should be fairly self sufficient.

提交回复
热议问题