optimized git how cloning and checking out is handled