Spaces:
Paused
Paused
Download tools/git_init.sh from gulle1155/studiotest: direct link, hf CLI and curl.
- Browser
- Download file 526 Bytes
-
https://huggingface.co/spaces/gulle1155/studiotest/resolve/main/tools/git_init.sh
- Command line
-
hf download hf://spaces/gulle1155/studiotest/tools/git_init.sh
-
curl -L -o git_init.sh https://huggingface.co/spaces/gulle1155/studiotest/resolve/main/tools/git_init.sh
526 Bytes
| # Recreate the repo after a Space rebuild wipes /app/.git. | |
| # Needs a WRITE token in $GIT_TOKEN — the auto HF_TOKEN is read-only. | |
| set -euo pipefail | |
| cd "${1:-/app}" | |
| git init -b main | |
| git config user.email "gulle1155@users.noreply.huggingface.co" | |
| git config user.name "gulle1155" | |
| git remote add origin "https://gulle1155:${GIT_TOKEN}@huggingface.co/spaces/gulle1155/studio" | |
| git fetch origin main | |
| git reset --soft FETCH_HEAD | |
| git add -A | |
| echo "--- staged (read this before committing) ---" | |
| git status --short | |