<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def rsync_git(local_path, remote_path, exclude=None, extra_opts=None, version_file='version.txt'):
 """Rsync deploy a git repo. Write and compare version.txt"""

    with settings(hide('output', 'running'), warn_only=True):
        print(green('Version On Server: ' + run('cat ' + '{}/{}'.format(
              remote_path, version_file)).strip()))
    print(green('Now Deploying Version ' +
          write_version(join(local_path, version_file))))
    rsync(local_path, remote_path, exclude, extra_opts)