mirror of
https://github.com/ivuorinen/cheatsheet-tldr.git
synced 2026-02-16 14:49:10 +00:00
Update cheatsheets
This commit is contained in:
25
tldr/git-sparse-checkout
Normal file
25
tldr/git-sparse-checkout
Normal file
@@ -0,0 +1,25 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, common]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# git sparse-checkout
|
||||
|
||||
> Check out only part of a repository’s files instead of cloning or checking out everything.
|
||||
> More information: <https://manned.org/git-sparse-checkout>.
|
||||
|
||||
- Enable sparse checkout:
|
||||
|
||||
`git sparse-checkout init`
|
||||
|
||||
- Disable sparse-checkout and restore full repository:
|
||||
|
||||
`git sparse-checkout disable`
|
||||
|
||||
- Specify which directories (or files) to include:
|
||||
|
||||
`git sparse-checkout set {{path/to/directory}}`
|
||||
|
||||
- Add more paths later:
|
||||
|
||||
`git sparse-checkout add {{path/to/directory}}`
|
||||
Reference in New Issue
Block a user