This commit is contained in:
adrian 2024-06-18 09:03:05 +02:00
parent 19e0dc9c2f
commit ae7358e6f1

View File

@ -1,5 +1,10 @@
#!/bin/bash #!/bin/bash
# Clone un dépôt git au bon endroit
# Stocker un minum de données (et donc nettoyer)
# Télécharger un minimum de données
# En cas de conflit donner raison au remote (on écrase les versions locales)
declare -A usage declare -A usage
declare -A varia declare -A varia
@ -71,7 +76,7 @@ if [ -d .git ] ; then
tagref="tags/$tag" tagref="tags/$tag"
fi fi
run git fetch origin "$branch" --tags run git fetch origin "$branch" --tags -f
run git checkout --force $tagref -B "$branch" run git checkout --force $tagref -B "$branch"
run git reset --hard # TODO we can keep some files? run git reset --hard # TODO we can keep some files?
# Preserve existing files in some cases # Preserve existing files in some cases