Add tests for git operations

Extracted the dependencies on Git and filesystem and added unit tests for dependency and git ops.