You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: book/10-git-internals/sections/objects.asc
+6-6Lines changed: 6 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -149,8 +149,8 @@ image::images/data-model-1.png[Simple version of the Git data model.]
149
149
You can fairly easily create your own tree.
150
150
Git normally creates a tree by taking the state of your staging area or index and writing a series of tree objects from it.
151
151
So, to create a tree object, you first have to set up an index by staging some files.
152
-
To create an index with a single entry – the first version of your test.txt file – you can use the plumbing command `update-index`.
153
-
You use this command to artificially add the earlier version of the test.txt file to a new staging area.
152
+
To create an index with a single entry – the first version of your `test.txt` file – you can use the plumbing command `update-index`.
153
+
You use this command to artificially add the earlier version of the `test.txt` file to a new staging area.
154
154
You must pass it the `--add` option because the file doesn't yet exist in your staging area (you don't even have a staging area set up yet) and `--cacheinfo` because the file you're adding isn't in your directory but is in your database.
If you created a working directory from the new tree you just wrote, you would get the two files in the top level of the working directory and a subdirectory named `bak` that contained the first version of the test.txt file.
223
+
If you created a working directory from the new tree you just wrote, you would get the two files in the top level of the working directory and a subdirectory named `bak` that contained the first version of the `test.txt` file.
224
224
You can think of the data that Git contains for these structures as being like this:
0 commit comments