Command | New files | Changed files | Deleted files |
Alice creates a new repository.
snap no: 1 | |||
She creates a file whose content is simply:
snap no: 2 | |||
snap no: 3 | |||
She adds another line (
snap no: 4 | |||
Alice commits the newly added file
Note: this commits the content of the file that was added (blob object 257cc56â¦), not the content of the file as it is in the working directory.
Note also that the content of the working directory would be commited if
Alice executed the commit with a dot: snap no: 5 | .git/COMMIT_EDITMSG .git/logs/HEAD .git/logs/refs/heads/master .git/objects/74/f368428d95727df902bbed18193f8d015157de [commit].git/objects/8c/2d63ef60a3c32bd1dd3b88ebdae3e25fa66119 [tree].git/refs/heads/master | ||
Because the commit didn't commit the file in the working directory, the file's status is modified:
snap no: 6 | |||
Showing the content of the file as stored in the repository:
snap no: 7 | |||
Alice resets the working tree so that it matches HEAD:
Note: it creates .git/ORIG_HEAD snap no: 8 | .git/ORIG_HEAD | ||
Thus, the content of
snap no: 9 |