@@ -235,10 +235,10 @@ Then, you specify the mode, SHA-1, and filename:
235235自前でツリーを作るのも非常に簡単です。
236236Gitは通常、ステージングエリアやインデックスの状態を取得してツリーを作成し、そのツリーをもとに一連のツリーオブジェクトを書き込みます。
237237そのため、ツリーオブジェクトを作るには、まずファイルをステージングしてインデックスを作成しなければなりません。
238- 単一のエントリー – ここでは`test.txt`ファイルの最初のバージョン – からインデックスを作るには、`update-index` という配管コマンドを使います。
239- このコマンドは、前のバージョンの`test.txt`ファイルをあえて新しいステージングエリアに追加する際に使用します。
238+ 単一のエントリー – ここでは `test.txt` ファイルの最初のバージョン – からインデックスを作るには、`update-index` という配管コマンドを使います。
239+ このコマンドは、前のバージョンの `test.txt` ファイルをあえて新しいステージングエリアに追加する際に使用します。
240240ファイルはまだステージングエリアには存在しない(まだステージングエリアをセットアップさえしていない)ので、`--add` オプションを付けなければなりません。
241- また、追加しようとしているファイルはディレクトリには無くデータベースにあるので、`--cacheinfo`オプションを付ける必要があります。
241+ また、追加しようとしているファイルはディレクトリには無くデータベースにあるので、`--cacheinfo` オプションを付ける必要があります。
242242その次に、モード、SHA-1、ファイル名を指定します。
243243
244244[source,console]
285285//////////////////////////
286286You'll now create a new tree with the second version of `test.txt` and a new file as well:
287287//////////////////////////
288- 今度は、2つめのバージョンの`test.txt`と、新規作成したファイルから、新しくツリーを作ります。
288+ 今度は、2つめのバージョンの `test.txt` と、新規作成したファイルから、新しくツリーを作ります。
289289
290290[source,console]
291291----
@@ -298,7 +298,7 @@ $ git update-index --add new.txt
298298Your staging area now has the new version of `test.txt` as well as the new file `new.txt`.
299299Write out that tree (recording the state of the staging area or index to a tree object) and see what it looks like:
300300//////////////////////////
301- これでステージングエリアには、`new.txt`という新しいファイルに加えて、新しいバージョンの`test.txt`も登録されました。
301+ これでステージングエリアには、 `new.txt` という新しいファイルに加えて、新しいバージョンの `test.txt` も登録されました。
302302このツリーを書き出して(ステージングエリアまたはインデックスの状態をツリーオブジェクトとして記録して)、どのようになったか見てみましょう。
303303
304304[source,console]
@@ -311,12 +311,12 @@ $ git cat-file -p 0155eb4229851634a0f03eb265b69f5a2d56f341
311311----
312312
313313//////////////////////////
314- Notice that this tree has both file entries and also that the `test.txt` SHA-1 is the `` version 2'' SHA-1 from earlier (`1f7a7a`).
314+ Notice that this tree has both file entries and also that the `test.txt` SHA-1 is the "` version 2`" SHA-1 from earlier (`1f7a7a`).
315315Just for fun, you'll add the first tree as a subdirectory into this one.
316316You can read trees into your staging area by calling `read-tree`.
317317In this case, you can read an existing tree into your staging area as a subtree by using the `--prefix` option to `read-tree`:
318318//////////////////////////
319- このツリーに両方のファイルエントリがあること、また、`test.txt`のSHA-1が先ほどの `` version 2'' のSHA-1(`1f7a7a`)であることに注意してください。
319+ このツリーに両方のファイルエントリがあること、また、`test.txt` のSHA-1が先ほどの "` version 2`" のSHA-1( `1f7a7a` )であることに注意してください。
320320ちょっと試しに、最初のツリーをサブディレクトリとしてこの中に追加してみましょう。
321321`read-tree` を呼ぶことで、ステージングエリアの中にツリーを読み込むことができます。
322322このケースでは、`--prefix` オプションを付けて `read-tree` コマンドを使用することで、ステージングエリアの中に、既存のツリーをサブツリーとして読み込むことができます。
@@ -336,7 +336,7 @@ $ git cat-file -p 3c4e9cd789d88d8d89c1073707c3585e41b0e614
336336If 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.
337337You can think of the data that Git contains for these structures as being like this:
338338//////////////////////////
339- 先ほど書き込んだ新しいツリーから作業ディレクトリを作っていれば、作業ディレクトリの直下にファイルが2つと、最初のバージョンの`test.txt`ファイルが含まれている `bak` という名前のサブディレクトリが入ります。
339+ 先ほど書き込んだ新しいツリーから作業ディレクトリを作っていれば、作業ディレクトリの直下にファイルが2つと、最初のバージョンの `test.txt` ファイルが含まれている `bak` という名前のサブディレクトリが入ります。
340340このような構成に対し、Gitが格納するデータのイメージは次のようになります。
341341
342342//////////////////////////
0 commit comments