# V2 Artist Shallow Clone

This guide covers `TODOS.phase-72.72.20.1.9`: a fast artist onboarding clone
that downloads the current Git tree and only the latest useful Git LFS payloads
instead of full LFS history.

## Source Of Truth

- Manifest: `V2/ue/Build/AssetPipeline/v2-artist-shallow-clone.json`
- Plan tool: `V2/ue/Tools/v2_artist_shallow_clone.py`
- Validator: `V2/ue/Tools/check-v2-artist-shallow-clone.py`
- LFS backend policy: `V2/ue/Build/AssetPipeline/v2-lfs-storage-backend.json`

## Artist Clone Flow

Use the plan tool to print the exact commands for the studio repository URL:

```bash
python3 V2/ue/Tools/v2_artist_shallow_clone.py plan \
  --repo-url git@github.com:GreyChimp/oshun.git \
  --workspace ~/OshunV2Artist
```

The generated flow uses these required commands:

```bash
GIT_LFS_SKIP_SMUDGE=1 git clone --depth 1 --single-branch --branch main --filter=blob:none <repo-url> <workspace>
git -C <workspace> sparse-checkout init --cone
git -C <workspace> sparse-checkout set V2/ue V2/docs/asset-pipeline TODOS/phase-72.md
git -C <workspace> lfs install --local
git -C <workspace> config lfs.fetchrecentrefsdays 7
git -C <workspace> config lfs.fetchrecentcommitsdays 0
git -C <workspace> lfs fetch --recent
git -C <workspace> lfs checkout V2/ue
```

## Latest LFS Payloads Only

The clone starts with `GIT_LFS_SKIP_SMUDGE=1`, so checkout creates LFS pointers
without downloading every binary payload. `git lfs fetch --recent` then fetches
only current and recent refs according to the local `lfs.fetchrecent*` settings.
Do not use `git lfs fetch --all` for artist onboarding; it defeats the shallow
clone goal by downloading historical LFS objects.

## Sparse Workspace

The default sparse roots are `V2/ue`, `V2/docs/asset-pipeline`, and
`TODOS/phase-72.md`. Artists who need more folders should add narrow paths with
`git sparse-checkout add <path>` instead of disabling sparse checkout for the
whole monorepo.

## Validation Commands

Run these before publishing the onboarding instructions:

```bash
python3 V2/ue/Tools/v2_artist_shallow_clone.py self-test
python3 V2/ue/Tools/check-v2-artist-shallow-clone.py
python3 -m json.tool V2/ue/Build/AssetPipeline/v2-artist-shallow-clone.json
python3 V2/ue/Tools/check-v2-ci-workflow.py
```
