Git v2.25.0 的 Partial Checkout

Git v2.25.0 出了一個大家等了很久的功能 Partial Checkout,可以只抓取部份的內容:「[ANNOUNCE] Git v2.25.0」。另外也可以看 GitHub 的整理:「Highlights from Git 2.25」。

這個功能正式名稱是 sparse-checkout

* Management of sparsely checked-out working tree has gained a dedicated "sparse-checkout" command.
* "git sparse-checkout list" subcommand learned to give its output in a more concise form when the "cone" mode is in effect.

這個功能目前還是 experimental,目前 GitHub 還沒有支援,如果要玩的可能要用自己的 server 來測:

Partial clones are still considered an experimental feature from Git’s point of view. For instance, many providers (such as GitHub) don’t support this feature yet, and it’s continually changing and evolving within Git from release to release.

看了一下公告,這個功能的主力是 Microsoft 的 Derrick Stolee 推進來的,再等幾個版本應該有機會在各大平台上用。

Leave a Reply

Your email address will not be published. Required fields are marked *