簡體   English   中英

如何使用gitpython進行git獲取?

[英]How to git fetch using gitpython?

我正在尋找一種獲取gitpython的等效方法

git fetch --quiet --all

如何在python中執行git fetch?

fetch方法等同於發出git fetch 因此,您可以通過迭代並逐個獲取每個遙控器來獲取所有遙控器:

repo = git.Repo('name_of_repo')
for remote in repo.remotes:
    remote.fetch()

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM