How to git fetch using gitpython?
<p>I am looking for a equivalent way to fetch in gitpython</p>

<pre><code>git fetch --quiet --all
</code></pre>

<p>How can I perform git fetch in python?</p>

<p>The <a href="http://gitpython.readthedocs.io/en/stable/reference.html?highlight=Fetch#module-git.remote" rel="nofollow"><code>fetch</code> method</a> is equivalent to issuing <code>git fetch</code>. Accordingly, you can fetch all your remotes by iterating and fetching each individually:</p>

<pre><code>repo = git.Repo('name_of_repo')
for remote in repo.remotes:
    remote.fetch()
</code></pre>

python git gitpython