Skip to content

WHULS/py-auto-git

Repository files navigation

py-auto-git

https://www.pygit2.org/

基于pygit2的python自动化脚本

脚本 功能
git_push.py 自动push
git_history.py 查看历史记录
git_fetch.py 获取所有远程仓库
git_branch.py 查看所有分支
git_remote.py 查看远程仓库列表
git_merge.py 合并分支

运行

Windows

点击git_*.cmd文件直接执行

其他

python py_scripts/git_*.py

依赖

名称 作用 安装
pygit2 操作git仓库 pip install pygit2
colorama 在命令行显示颜色 pip install colorama
terminal_layout 命令行交互UI(列表选择) pip install terminal-layout

一键安装依赖:pip install -r requirements.txt

安装与部署

在python中安装相关依赖后,直接拷贝脚本到你的git仓库中即可运行。

建议将以下两行添加到.gitignore

git_*.cmd
git_*.py

效果演示

git_push

image-20220225181943487

git_history

one-line:

image-20220225182131096

full:

image-20220225182022576

git_fetch

image-20220427221817476

git_branch

image-20220427221504032

git_remote

image-20220427221615566

git_merge

image-20220428034104412

About

基于pygit2的python自动化脚本

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published