Improve commit queries in GitRepository

Current implementation of History is deprecated and not running at the moment.