Skip to content

Instantly share code, notes, and snippets.

@royra
Created April 16, 2020 06:23
Show Gist options
  • Save royra/76f863a3814dce5cea82d60912f5a109 to your computer and use it in GitHub Desktop.
Save royra/76f863a3814dce5cea82d60912f5a109 to your computer and use it in GitHub Desktop.
#!/usr/bin/env bash
set -euo pipefail
mkdir linux
pushd linux
git init
git config extensions.partialClone true
git config core.sparseCheckout true
echo "kernel/acct.c" >> .git/info/sparse-checkout
echo "kernel/async.c" >> .git/info/sparse-checkout
git remote add origin https://royra:$GITHUB_TOKEN@github.com/salto-io/linux-flat.git
git fetch --depth=1 --filter=tree:0 origin master
git checkout master
git config user.email you@example.com
git config user.name "Your Name"
echo "// this is an edit" >> kernel/acct.c
echo "// this is an edit too" >> kernel/async.c
git commit -m "made an edit" kernel/acct.c kernel/async.c
git push origin
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment