Jafner.net/homelab/docs/Git Sparse-Checkout.md
Joey Hafner 6086222503
Reorganize root level of repo.
- Move homelab, Jafner.dev (now called blog) to root.
- Rename "archived projects" -> "archive"
- Rename "active projects" -> "projects"
- Rename "jafner-homebrew" -> "5ehomebrew"
- Rename "docker-llm-amd" -> "local-ai"
2024-07-16 12:17:55 -07:00

18 lines
737 B
Markdown

# Git Sparse-Checkout
We don't want every device that needs *any* part of the Jafner.net monorepo to get *all* of the monorepo. So we use [`git-sparse-checkout`](https://git-scm.com/docs/git-sparse-checkout) to pull only one or more subpaths when we clone.
Ensure that the device to be configured has an SSH pubkey with permission to pull/push to the repository.
```bash
mkdir ~/Jafner.net
cd ~/Jafner.net
git config --global init.defaultBranch main
git init
git config core.sparseCheckout true
git config core.fileMode false
git config pull.ff only
git config init.defaultBranch main
echo "homelab/$HOSTNAME/" >> .git/info/sparse-checkout
git remote add -f origin ssh://git@gitea.jafner.tools:2225/Jafner/Jafner.net.git
git pull
```