'Install the git tree in a host.
:param host: Host object.
:param build: Whether to build the source tree.
:param branch: Check out this specific branch before building.
:param commit: Check out this specific commit before building.'

def install(self, host, build=True, branch=None, commit=None):

    self.execute()
    if ((branch is not None) or (commit is not None)):
        self.checkout(branch=branch, commit=commit)
    logging.info('Pushing    %s    to    client', self.destination_dir)
    host.send_file(self.destination_dir, os.path.dirname(self.remote_destination_dir))
    sk = source_kernel.SourceKernel(self.remote_destination_dir)
    if build:
        for p in self.patches:
            sk.patch(p)
        sk.configure(self.config)
        sk.build(host)
    sk.install(host)
