Skip to content

Instantly share code, notes, and snippets.

@zthxxx
Last active September 2, 2024 14:06
Show Gist options
  • Save zthxxx/2bcf09618887f79f85c9f1dce91f0d63 to your computer and use it in GitHub Desktop.
Save zthxxx/2bcf09618887f79f85c9f1dce91f0d63 to your computer and use it in GitHub Desktop.
git fetch --all
# 7 天内有多少 commit 改动了 package-lock
git log --format=format:'%h' --no-merges --since="7 days ago" --all -- package-lock.json | wc -l
# 7 天内所有 commit 共产生了多少完全无重复的 package-lock
git log --format=format:'%h' --no-merges --since="7 days ago" --all -- package-lock.json | \
xargs -I{} git ls-tree {} package-lock.json | \
sort | uniq | wc -l
# 30 天内有哪些人改动 package.json
git log --format=format:'%ae' --no-merges --since="30 days ago" --all -- packages/*/package.json | sort | uniq
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment