Cache various Repository Git operations

Merged yorickpeterse-staging requested to merge caching-repository-git-operations into master