基于pygit2的python自动化脚本
脚本 | 功能 |
---|---|
git_push.py | 自动push |
git_history.py | 查看历史记录 |
git_fetch.py | 获取所有远程仓库 |
git_branch.py | 查看所有分支 |
git_remote.py | 查看远程仓库列表 |
git_merge.py | 合并分支 |
点击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
one-line:
full: