How to sudo git clone and safely change permission to another user

Solution 1:

sudo chown -R user:user path

This recursively changes the owner and group of everything under path to user.