GitPythonPython 的 Git 开发包

联合创作 · 2023-10-01 06:45

GitPython 是一个 Python 库用来和 Git 资料库进行交互,提供各种级别的操作,例如高级的 git-porcelain 和低级的 git-plumbing.

GitPython 提供了 Git 对象的抽象封装以简化数据的访问。

示例代码:

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
浏览 5
点赞
评论
收藏
分享

手机扫一扫分享

编辑
举报
评论
图片
表情
推荐
点赞
评论
收藏
分享

手机扫一扫分享

编辑
举报