I've already read "Using git directly". But using IPython object introspection, it doesn't look like something like "gc" is a method there. The following seems to work. Is that the recommended way? a_repo.git.execute("git gc".split())