If you logic is the same, you can use bash function to avoid copying. Besides, commit message can also be passed as an argument. try this
#!/usr/bin/env bash
dbg() {
dbg_dir=$1
webroot_dir=$2
inotifywait -mr -e ATTRIB $dbg_dir |
while read dir ev file;
do
cd /path/to/dbg
git pull;
git add .;
git commit -m " something regarding this website has changed. check .... for more info";
git push;
ssh remote@server.com 'cd $webroot_dir; git pull';
done;
}
dbg /path/to/dbg /path/to/webroot1 & # & will run the command in background
dbg /path/to/dbg2 /path/to/webroot2 &
dbg /path/to/dbg3 /path/to/webroot3 &