cd <main-project-folder>
git clone --filter=blob:none --no-checkout --depth 1 --sparse <project-url>
cd <folder-from-git-clone>
git sparse-checkout add <folder1> <folder2> ...
#https://stackoverflow.com/a/65020975 | |
git fetch --all --prune | |
# reset branch only if it has deviated from the remote | |
function update_branch { | |
if git diff --exit-code --quiet $1; then | |
echo "No changes on branch $1" | |
else | |
echo "Resetting branch $1" |
let typesList = [ | |
{ | |
"slug": "Anything", | |
"name": "Anything" | |
}, | |
{ | |
"slug": "String", | |
"name": "String", | |
"children": [ | |
{ |