GitPython 的 Git、linux shell 命令替代方案

问题描述

我正在尝试获取所有合并的分支以及陈旧的分支(未使用 3 个月) 我有为 linux shell 编写的命令。但是,我需要在 Gitpyhon 中编写一个替代命令。有人可以帮我吗?

self.cmd("git branch --merged master") # <-- Display,merged branches
self.cmd(                              # <-- Display stale branches
    "for branch in `git branch -r | grep -v HEAD`;"
    "do echo -e `git log --before=\"3 months\" --no-merges"
    " -n 1 --format=\"%cr | %an | %ae | \""
    " $branch | head -n 1` \\t$branch; done | sort -M"
)

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)