<commit_before>#!/bin/bash --norc

#Stop on error
set -e

if [ $# -ne 1 ]; then
    echo "Missing argument"
    exit 1
fi

master=$1
br_list=`git br`
current=`echo "$br_list" | grep "^\*" | awk '{print $2}'`
up_list=`echo "$br_list" | sed "s/[ *]//g" | grep -v "$master"`

echo -e "Branches to update :\n$up_list\n"
git co $master
git svn rebase
for branch in $up_list; do
    echo -e "\nRebasing '$branch'"
    git rebase $master $branch
done
echo -e "\n"
git co $current
<commit_msg>Keep backup branch before rebasing<commit_after>#!/bin/bash --norc

#Stop on error
set -e

if [ $# -ne 1 ]; then
    echo "Missing argument"
    exit 1
fi

master=$1
br_list=`git br`
current=`echo "$br_list" | grep "^\*" | awk '{print $2}'`
up_list=`echo "$br_list" | sed "s/[ *]//g" | grep -v "$master" | grep -v "\-[0-9]\{10\}"`
now=`date +%y%m%d%H%M`

echo -e "Branches to update :\n$up_list\n"
git co $master
git svn rebase
for branch in $up_list; do
    echo -e "\nSaving branch in '$branch-$now'"
    git branch $branch-$now $branch
    echo -e "\nRebasing '$branch'"
    git rebase $master $branch
done
echo -e "\n"
git co $current

{'fraction_non_alphanumeric': 0.18416370106761565, 'fraction_numerical': 0.010676156583629894, 'mean_word_length': 3.277566539923954, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, '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': '2827020', 'n_tokens_mistral': 467, 'n_tokens_neox': 443, 'n_words': 151}