Actualiser README.md
This commit is contained in:
parent
fe37b4cc7c
commit
c09c9c1108
37
README.md
37
README.md
|
|
@ -26,3 +26,40 @@ All my public sourcecode and binaries(apk, ubuntu binaries, freebsd binaries and
|
|||

|
||||
|
||||

|
||||
|
||||
#Using Sparse Checkout
|
||||
|
||||
Sparse checkout allows you to check out only part of the working directory. This is particularly useful for large repositories where you only need a specific subdirectory.
|
||||
Step 1: Initialize the Repository
|
||||
|
||||
First, clone the repository with the --no-checkout option to avoid checking out the files immediately.
|
||||
|
||||
```sh
|
||||
git clone --no-checkout <repository-url>
|
||||
cd <repository-directory>
|
||||
```
|
||||
|
||||
Step 2: Enable Sparse Checkout
|
||||
|
||||
Configure Git to enable sparse checkout.
|
||||
```sh
|
||||
git sparse-checkout init
|
||||
```
|
||||
|
||||
Step 3: Define the Subdirectory
|
||||
|
||||
Specify the subdirectory you want to clone. For example, if you want to clone the ``` cpp ``` subdirectory:
|
||||
|
||||
```sh
|
||||
git sparse-checkout set cpp
|
||||
```
|
||||
|
||||
Step 4: Checkout the Subdirectory
|
||||
|
||||
Now, checkout the repository. Only the specified subdirectory will be checked out.
|
||||
|
||||
```sh
|
||||
git checkout main
|
||||
```
|
||||
|
||||
Replace main with the appropriate branch name if it differs.
|
||||
Loading…
Reference in New Issue
Block a user