Skip to content

Instantly share code, notes, and snippets.

@lcomplete
Last active December 27, 2021 08:39
Show Gist options
  • Save lcomplete/044919618bdaae1d4747f47d3c391aa0 to your computer and use it in GitHub Desktop.
Save lcomplete/044919618bdaae1d4747f47d3c391aa0 to your computer and use it in GitHub Desktop.
更新所有子目录的git仓库
# 更新所有子目录的git仓库
for dir in $(find . -maxdepth 2 -mindepth 2 -type d | xargs); do (echo "$dir" && cd "$dir" && git pull); done
# 按月统计所有仓库的提交次数
for dir in $(find . -maxdepth 2 -mindepth 2 -type d | xargs); do (echo "$dir" && cd "$dir" && git-quick-stats -m | sed '1,3d' | awk '{print $1, $2}' >> /mnt/e/report/commit.txt); done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment