Does git “dirty” mean files not staged, or not committed? (glossary conflict)

前端 未结 3 1977
情书的邮戳
情书的邮戳 2020-12-31 03:49

https://www.kernel.org/pub/software/scm/git/docs/gitglossary.html#def_dirty A working tree is said to be \"dirty\" if it contains modifications which have not been committed

3条回答
  •  萌比男神i
    2020-12-31 04:15

    According to the official Git documentation, in the section on Stashing, a dirty state is defined as ... the dirty state of your working directory — that is, your modified tracked files and staged changes. From this definition, files staged for commit are dirty as well. This means that the kernel.org article is correct, while the gitguys.com article is pretty much wrong. You should probably point this out to them.

提交回复
热议问题