2017年12月14日 星期四

[ Git 常見問題 ] Git - list all authors of a folder of files?

Source From Here 
Question 
How can I list the author names of a particular folder that's versioned by git

I see that I can git blame a file and list the author of each line, but I can't do that for a folder, and I would also like only a unique list (each author listed only once

How-To 
Based on The shortest possible output from git log containing author and date, you can use command git log
// '%an': author name
// '%x00': print a byte from a hex code

# git log --pretty=format:"%an%x09" myfolder | sort | uniq


Supplement 
Git log pretty-formats

沒有留言:

張貼留言

[Git 常見問題] error: The following untracked working tree files would be overwritten by merge

  Source From  Here 方案1: // x -----删除忽略文件已经对 git 来说不识别的文件 // d -----删除未被添加到 git 的路径中的文件 // f -----强制运行 #   git clean -d -fx 方案2: 今天在服务器上  gi...