Browse Source

Clarify that Git objects are created on `git add`

Running `git add` creates a blob object and updates the index. On `git
commit`, a single tree object that points to already existing other
objects is generated and added to object database, as well as adjusting
the refs.
Utku Gultopu 4 years ago
parent
commit
38b7b76b95
1 changed files with 3 additions and 2 deletions
  1. 3 2
      docs/tutorial/file-format.txt

+ 3 - 2
docs/tutorial/file-format.txt

@@ -69,8 +69,9 @@ A blob file looks like this::
 
 
   blob <content length><NUL><content>
   blob <content length><NUL><content>
 
 
-If you change a single line, another blob will be generated by Git at commit
-time. This is how Git can fastly checkout any version in time.
+If you change a single line, another blob will be generated by Git each time you
+successfully run ``git add``. This is how Git can fastly checkout any version in
+time.
 
 
 On the opposite, several identical files with different filenames generate
 On the opposite, several identical files with different filenames generate
 only one blob. That's mostly how renames are so cheap and efficient in Git.
 only one blob. That's mostly how renames are so cheap and efficient in Git.