diff --git a/sync-to-server.sh b/sync-to-server.sh index 59da98e..ddbbd64 100755 --- a/sync-to-server.sh +++ b/sync-to-server.sh @@ -32,8 +32,11 @@ ssh $SERVER_USER@$SERVER_IP << EOF cd $PROJECT_DIR if [ ! -d ".git" ]; then - echo "🌑 Initializing production repository (First time)..." - git clone https://git.intaleqapp.com/Hamza/musadeq.git . + echo "🌑 Initializing production repository (Force setup in non-empty dir)..." + git init + git remote add origin https://git.intaleqapp.com/Hamza/musadeq.git + git fetch --all + git reset --hard origin/main else echo "⬇️ Pulling latest changes from Git..." git pull origin main