Certain commands git, such as git add ..., change the state of a file .git/index, but I believe that some of these operations can be thought of as a series of smaller operations. For instance,
git add foo bar
can be decomposed into
git add foo
git add bar
In fact, maybe (for everyone I know) the above teams can be divided into even “fine-grained” (but still “ .git/index-modeling”) gitteams.
My question is, what minor modifications can be made to a file .git/indexusing commands git? IOW, what are the "atomic" command line operations on .git/index?
I assume that all these teams will be plumbing teams. In addition, if I were to guess, I would suggest that gid add <file>they git rm --cached <file>would approach two of these operations. On the other hand, it git mv <old> <new>can be a compound “atomic” deletion followed by an “atomic” addition ...
EDIT: The motivation for this question is as follows.
The behavioral aspects gitthat I find most confusing are those that lead to file modification .git/index. Everything else is a gitlittle more open to verification. The file .git/index, however, is quite opaque.
For this reason, I would like to better understand how the file changes .git/index.
source
share