-
clone the official git repo
git clone https://github.com/git/git.git git-raw
-
Change directory to the cloned repo
cd git-raw
-
create a new directory where we can store the compiled git resources
mkdir -p /home/$USER/bin/git
-
make sure that the file configure is executable
-
install git as non root user
set git alias (windows cmd or linux bash)
git config --global --edit
In the "alias" section:
[alias]
change-commits = "!f() { VAR=$1; OLD=$2; NEW=$3; shift 3; git filter-branch --env-filter \"if [ \\\"$`echo $VAR`\\\" = '$OLD' ]; then export $VAR='$NEW'; fi\" $@; }; f "