Skip to content

Commit e273cfa

Browse files
authored
Add git one-liner to find number of commits per subfolder
Also add a subfolder to store similar small git tricks
1 parent d79b529 commit e273cfa

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Find number of commits per subfolder
2+
3+
Just wanted to share a oneliner I whipped up, for that use case where you want to analyse a big git repo
4+
and find out in which folder the activity has been.
5+
I.e. If you are considering splitting up a repo with a couple 100k commits, then it can be good to estimate
6+
the number of commits in the subfolders being split out.
7+
8+
`for dir in ./*; do (echo "$dir " && git rev-list --count HEAD -- "$dir"); done`
9+
10+
Yes, this also includes any direct files in root folder, but I didn’t bother excluding those.
11+
Feel free to improve and share back.

0 commit comments

Comments
 (0)