Git 使用技巧——按作者列出所有的分支

 

https://stackoverflow.com/questions/36026374/is-there-a-script-to-list-git-branches-created-by-me

git for-each-ref --no-merged dev --format='%(authorname),%(refname:lstrip=3),%(refname:short)' --sort=authorname | while IFS=',' read author branch remote_branch; do
  printf "%20s | %40s | %s\n" "$author" "$branch" "$remote_branch"
done | grep origingit for-each-ref --format='%(authorname),%(refname:lstrip=3),%(refname:short)' --sort=authorname | while IFS=',' read author branch remote_branch; do
  printf "%20s | %40s | %s\n" "$author" "$branch" "$remote_branch"
done

发表回复

您的电子邮箱地址不会被公开。 必填项已用 * 标注