List remote Git branches and the last commit's author and author date for each branch. Sort by most recent commit's author date.
Listing each branch and its last revision's date in Git
List remote Git branches and the last commit's author and author date for each branch. Sort by most recent commit's author date.
# Credit http://stackoverflow.com/a/2514279 |
for branch in `git branch -r | grep -v HEAD`;do echo -e `git show --format="%ai %ar by %an" $branch | head -n 1` \\t$branch; done | sort -r
或者在.gitconfig中配置
[alias]
branchauthors = "! for branch in `git branch -r | grep -v HEAD`;do echo `git show --format=\"%ai %ar by %an\" $branch | head -n 1` \t$branch; done | sort -r"
显示commit的前9个字符
branchauthors = "! for branch in `git branch -r | grep -v HEAD`; do sha=$(git rev-parse --short=9 $branch); commit_info=$(git show --format=\"%ai %ar by %an\" $branch | head -n 1); echo \"$commit_info $sha\t$branch\"; done | sort -r"
作者:Chuck Lu GitHub |
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 全程不用写代码,我用AI程序员写了一个飞机大战
· DeepSeek 开源周回顾「GitHub 热点速览」
· MongoDB 8.0这个新功能碉堡了,比商业数据库还牛
· 记一次.NET内存居高不下排查解决与启示
· 白话解读 Dapr 1.15:你的「微服务管家」又秀新绝活了
2022-03-05 进制转换
2021-03-05 jQuery ajax() success, error VS .done(), .fail()
2021-03-05 because they do not possess a common algorithm
2021-03-05 微增长时代
2021-03-05 excel在一个单元格 引用另外一个单元格
2019-03-05 IIS Logs
2019-03-05 21. Merge Two Sorted Lists