Skip to content

Instantly share code, notes, and snippets.

@MarisaKirisame
Created March 25, 2021 22:42
Show Gist options
  • Save MarisaKirisame/b7fbb04bf5cedf5ae978f85dac51d79e to your computer and use it in GitHub Desktop.
Save MarisaKirisame/b7fbb04bf5cedf5ae978f85dac51d79e to your computer and use it in GitHub Desktop.
fetch.sh
#!/bin/bash
set -e
set -x
mkdir $1
cd $1
gclient root
gclient config --spec "solutions = [
{
\"name\": \"src\",
\"url\": \"git@github.com:MarisaKirisame/$1.git\",
\"managed\": False,
\"custom_deps\": {},
\"custom_vars\": {},
},
]
"
gclient sync --nohooks --no-history
echo 'I had clone the repo without history. In order to fetch other branch you have to unshallow it till they exist.'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment