GitPythonPython 的 Git 開(kāi)發(fā)包
GitPython 是一個(gè) Python 庫(kù)用來(lái)和 Git 資料庫(kù)進(jìn)行交互,提供各種級(jí)別的操作,例如高級(jí)的 git-porcelain 和低級(jí)的 git-plumbing.
GitPython 提供了 Git 對(duì)象的抽象封裝以簡(jiǎn)化數(shù)據(jù)的訪問(wèn)。
示例代碼:
from git import *
repo = Repo("/Users/mtrier/Development/git-python")
assert repo.bare == False
repo = Repo.init("/var/git/git-python.git", bare=True)
assert repo.bare == True評(píng)論
圖片
表情
