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

沒有留言:

張貼留言

[ Py DS ] Ch1 - IPython: Beyond Normal Python

Source From  Here   Keyboard Shortcuts in the IPython Shell   If you spend any amount of time on the computer, you’ve probably found a u...