try the commands in the itflow directory @wrongecho stated in POST 12 but with sudo -u www-data
sudo -u www-data git config --system --add safe.directory '*'
sudo -u www-data git reset --hard
sudo -u www-data git pull
This will assure the command run as web user and not root. I think the problem is running them as root and then root perms get set when pulling down files
You can easily post screenshots now