Skip to content

Instantly share code, notes, and snippets.

@DavidArsene
Created February 21, 2026 19:48
Show Gist options
  • Select an option

  • Save DavidArsene/4b26c2369b67306c37d71febf47d28e5 to your computer and use it in GitHub Desktop.

Select an option

Save DavidArsene/4b26c2369b67306c37d71febf47d28e5 to your computer and use it in GitHub Desktop.
Clone the linux repo but only the files required for kconfig (make *config)
#!/usr/bin/env bash
set -euo pipefail
BRANCH="v6.19"
git clone --depth 1 --filter blob:none --no-checkout --ref-format reftable --branch $BRANCH https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git linux
git -C linux sparse-checkout set --no-cone /scripts/kconfig/ '*Kconfig*'
git -C linux checkout
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment