Update cloneRepository() to fetch remote changes and hard reset