diff --git a/jeepyb/cmd/manage_projects.py b/jeepyb/cmd/manage_projects.py
index ba30a05..580ae23 100644
--- a/jeepyb/cmd/manage_projects.py
+++ b/jeepyb/cmd/manage_projects.py
@@ -347,16 +347,6 @@
     return None
 
 
-def fsck_repo(repo_path):
-    rc, out = u.git_command_output(repo_path, 'fsck --full')
-    # Check for non zero return code or warnings which should
-    # be treated as errors. In this case zeroPaddedFilemodes
-    # will not be accepted by Gerrit/jgit but are accepted by C git.
-    if rc != 0 or 'zeroPaddedFilemode' in out:
-        log.error('git fsck of %s failed:\n%s' % (repo_path, out))
-        raise Exception('git fsck failed not importing')
-
-
 def push_to_gerrit(repo_path, project, push_string, remote_url, ssh_env):
     try:
         u.git_command(repo_path, push_string % remote_url, env=ssh_env)
@@ -366,42 +356,6 @@
             "Error pushing %s to Gerrit." % project)
 
 
-def sync_upstream(repo_path, project, ssh_env, upstream_prefix):
-    u.git_command(
-        repo_path,
-        "remote update upstream --prune", env=ssh_env)
-    # Any branch that exists in the upstream remote, we want
-    # a local branch of, optionally prefixed with the
-    # upstream prefix value
-    for branch in u.git_command_output(
-            repo_path, "branch -a")[1].split('\n'):
-        if not branch.strip().startswith("remotes/upstream"):
-            continue
-        if "->" in branch:
-            continue
-        local_branch = branch.split()[0][len('remotes/upstream/'):]
-        if upstream_prefix:
-            local_branch = "%s/%s" % (
-                upstream_prefix, local_branch)
-
-        # Check out an up to date copy of the branch, so that
-        # we can push it and it will get picked up below
-        u.git_command(repo_path, "checkout -B %s %s" % (
-            local_branch, branch))
-
-    try:
-        # Push all of the local branches to similarly named
-        # Branches on gerrit. Also, push all of the tags
-        u.git_command(
-            repo_path,
-            "push origin refs/heads/*:refs/heads/*",
-            env=ssh_env)
-        u.git_command(repo_path, 'push origin --tags', env=ssh_env)
-    except Exception:
-        log.exception(
-            "Error pushing %s to Gerrit." % project)
-
-
 def process_acls(acl_config, project, ACL_DIR, section,
                  remote_url, repo_path, ssh_env, gerrit, GERRIT_GITID):
     if not os.path.isfile(acl_config):
@@ -567,7 +521,7 @@
                         find_description_override(repo_path)
                         or description)
 
-                    fsck_repo(repo_path)
+                    u.fsck_repo(repo_path)
 
                     if push_string:
                         push_to_gerrit(
diff --git a/jeepyb/cmd/track_upstream.py b/jeepyb/cmd/track_upstream.py
index 24e6245..65751b7 100644
--- a/jeepyb/cmd/track_upstream.py
+++ b/jeepyb/cmd/track_upstream.py
@@ -104,25 +104,6 @@
     u.git_command(repo_path, "checkout -B master origin/master")
 
 
-def fsck_repo(repo_path):
-    rc, out = u.git_command_output(repo_path, 'fsck --full')
-    # Check for non zero return code or warnings which should
-    # be treated as errors. In this case zeroPaddedFilemodes
-    # will not be accepted by Gerrit/jgit but are accepted by C git.
-    if rc != 0 or 'zeroPaddedFilemode' in out:
-        log.error('git fsck of %s failed:\n%s' % (repo_path, out))
-        raise Exception('git fsck failed not importing')
-
-
-def push_to_gerrit(repo_path, project, push_string, remote_url, ssh_env):
-    try:
-        u.git_command(repo_path, push_string % remote_url, env=ssh_env)
-        u.git_command(repo_path, "push --tags %s" % remote_url, env=ssh_env)
-    except Exception:
-        log.exception(
-            "Error pushing %s to Gerrit." % project)
-
-
 def sync_upstream(repo_path, project, ssh_env, upstream_prefix):
     u.git_command(
         repo_path,
@@ -235,7 +216,7 @@
                     update_local_copy(
                         repo_path, track_upstream, git_opts, ssh_env)
 
-                fsck_repo(repo_path)
+                u.fsck_repo(repo_path)
                 sync_upstream(repo_path, project, ssh_env, upstream_prefix)
 
             except Exception:
diff --git a/jeepyb/utils.py b/jeepyb/utils.py
index f79257d..f0b0265 100644
--- a/jeepyb/utils.py
+++ b/jeepyb/utils.py
@@ -154,6 +154,16 @@
         return "push %s HEAD:refs/heads/master"
 
 
+def fsck_repo(repo_path):
+    rc, out = git_command_output(repo_path, 'fsck --full')
+    # Check for non zero return code or warnings which should
+    # be treated as errors. In this case zeroPaddedFilemodes
+    # will not be accepted by Gerrit/jgit but are accepted by C git.
+    if rc != 0 or 'zeroPaddedFilemode' in out:
+        log.error('git fsck of %s failed:\n%s' % (repo_path, out))
+        raise Exception('git fsck failed not importing')
+
+
 class ProjectsRegistry(object):
     """read config from ini or yaml file.
 
