Subdirectory Checkouts with git sparse-checkoutによるとgit read-tree -mu HEAD、既存のリポジトリの場合、スパース チェックアウトを構成した後に呼び出します。
# Enable sparse-checkout:
git config core.sparsecheckout true
# Configure sparse-checkout
echo some/dir/ >> .git/info/sparse-checkout
echo another/sub/tree >> .git/info/sparse-checkout
# Update your working tree:
git read-tree -mu HEAD
read-treeステップを詳しく説明していただけますか?- それはどのように機能しますか?
- 何が起こっている?
read-treeを使用して使用しないのはなぜcheckoutですか?- なぜ使用する
-muのですか (なぜこれがマージなのか、何がマージされるのか)?
-m
Perform a merge, not just a read. The command will refuse to run if your index file has unmerged entries, indicating that you have not finished previous merge you started.-u
After a successful merge, update the files in the work tree with the result of the merge.