Let us say the bash script you intend to run is in a file by the name shellscript.sh
and it is on your path:
You can add the following bash function to your ~/.bashrc
.
git() {
if [[ $1 == "clone" ]]; then
command git "$@" && shellscript.sh;
else
command git "$@";
fi;
}
Note: You can add any command after &&.