<commit_before><commit_msg>Created new shell script for resetting repos to initial commit<commit_after>#!/bin/bash

REPO_PATH="/c/wamp/www/mmrpg-world.net.prototype/public_html/content/${1}/"
REPO_GIT=".git/"
REPO_CONFIG=".git/config"
TEMP_CONFIG="/c/wamp/tmp/${1}_config"

echo "================================"
echo "-- FACTORY RESET ${1^^} REPO --"
echo "================================"
echo ""

if test -d  "${REPO_PATH}"; then

    if test -f  "${REPO_PATH}${REPO_CONFIG}"; then

        echo "Switching to to ${REPO_PATH} repo ..."
        echo ""
        cd "${REPO_PATH}"

        echo "Copying ${REPO_CONFIG} to ${TEMP_CONFIG} ..."
        echo ""
        rm -f "${TEMP_CONFIG}"
        cp "${REPO_CONFIG}" "${TEMP_CONFIG}"

        echo "Deleting old ${REPO_GIT} directory ...";
        echo ""
        rm -rf "${REPO_GIT}"

        echo "Initializing new ${REPO_GIT} directory ..."
        echo ""
        git init

        echo ""
        echo "Copying ${TEMP_CONFIG} back to ${REPO_CONFIG} ..."
        echo ""
        rm -f "${REPO_CONFIG}"
        cp "${TEMP_CONFIG}" "${REPO_CONFIG}"

        echo "Re-adding all changes and commiting ...";
        echo ""
        git add .
        git commit -m "Initial commit"

        echo "Force-push the changes as if first commit ..."
        echo ""
        git push -u --force origin master

        echo ""
        echo "DONE!"

    else

        echo "${REPO_PATH}${REPO_CONFIG} does not exist!"
        echo ""
        echo "FAILED!"

    fi

else

    echo "${REPO_PATH} does not exist!"
    echo ""
    echo "FAILED!"

fi
{'fraction_non_alphanumeric': 0.18954659949622166, 'fraction_numerical': 0.001889168765743073, 'mean_word_length': 2.1653386454183265, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 1, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7124769', 'n_tokens_mistral': 515, 'n_tokens_neox': 498, 'n_words': 136}