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

沒有留言:

張貼留言

[ JS 常見問題 ] Javascript Date output formatting

Source From  Here   Question   I need to  capture the Now() date and time in the YYYY/mm/dd hh:m:sec format . It needs to be in GMT time. Ho...