That would be some tricky git work. I'm fairly sure some sort of separate database configuration would still be needed (such as modifying the wp-config file). Jump down to step 7 here (http://wp.tutsplus.com/tutorials/hosting/wordpress-developme...).