reset.sh: remove old commits from git repos

Only use the space required by the latest commit.
This commit is contained in:
Kaboom 2024-06-04 01:01:35 +03:00 committed by GitHub
parent ea048dfb54
commit 99e84a8a33
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -10,10 +10,16 @@ pkill -9 java
# Sync changes with the GitHub repository
cd ~/framework
git pull
git fetch origin --depth 1
git reset --hard origin/master
git reflog expire --expire=all --all
git gc --prune=all
cd ~/server-default
git pull
git fetch origin --depth 1
git reset --hard origin/master
git reflog expire --expire=all --all
git gc --prune=all
chmod -R 777 ~/server/
rm -rf ~/server/*