<commit_before>#!/bin/bash

set -e

BRANCH="offline-build"
REMOTE="https://$GITHUB_API_KEY@github.com/CoderDojoPotsdam/intro.git"

if ! [ -n "$GITHUB_API_KEY" ]; then
  echo "You should set the variable GITHUB_API_KEY to contain an api key with push access to this repository. It should have the form \"USERNAME:API_KEY\" See https://stackoverflow.com/a/33125422/1320237"
  exit 1
fi
if ! [ -n "$OFFLINE_BUILD_FOLDER" ]; then
  echo "You should set the variable OFFLINE_BUILD_FOLDER to contain the built version of the offline tutorial."
  exit 1
fi

echo "Create a temporary folder for checking out $BRANCH."
mkdir -p temp
cp -r .git temp
(
  set -e
  cd temp
  git fetch origin "+$BRANCH:$BRANCH"
  git checkout "$BRANCH"
)
mv temp/.git "$OFFLINE_BUILD_FOLDER"
rm -r temp

(
  set -e
  cd "$OFFLINE_BUILD_FOLDER"
  echo "Commit offline version into branch \"$BRANCH\""
  git add --all .
  git commit -am"Automated build $TRAVIS_BUILD_NUMBER"
  git push -f -q "$REMOTE" "$BRANCH" &2> /dev/null
  rm -r .git
)
<commit_msg>trying to push differently<commit_after>#!/bin/bash

set -e

BRANCH="offline-build"
REMOTE="https://$GITHUB_API_KEY@github.com/CoderDojoPotsdam/intro.git"

if ! [ -n "$GITHUB_API_KEY" ]; then
  echo "You should set the variable GITHUB_API_KEY to contain an api key with push access to this repository. It should have the form \"USERNAME:API_KEY\" See https://stackoverflow.com/a/33125422/1320237"
  exit 1
fi
if ! [ -n "$OFFLINE_BUILD_FOLDER" ]; then
  echo "You should set the variable OFFLINE_BUILD_FOLDER to contain the built version of the offline tutorial."
  exit 1
fi

echo "Create a temporary folder for checking out $BRANCH."
mkdir -p temp
cp -r .git temp
(
  set -e
  cd temp
  git fetch origin "+$BRANCH:$BRANCH"
  git checkout "$BRANCH"
)
mv temp/.git "$OFFLINE_BUILD_FOLDER"
rm -r temp

(
  set -e
  cd "$OFFLINE_BUILD_FOLDER"
  echo "Commit offline version into branch \"$BRANCH\""
  git add --all .
  git commit -am"Automated build $TRAVIS_BUILD_NUMBER"
  git push -f -q "$REMOTE-$BRANCH" "$BRANCH" 2> /dev/null
  rm -rf .git
)

{'fraction_non_alphanumeric': 0.11380145278450363, 'fraction_numerical': 0.017433414043583534, 'mean_word_length': 3.793503480278422, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, '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': '353401', 'n_tokens_mistral': 807, 'n_tokens_neox': 763, 'n_words': 251}