2 个版本
0.1.1 | 2021 年 11 月 12 日 |
---|---|
0.1.0 | 2018 年 10 月 29 日 |
#10 in #repos
24KB
599 行
git-summary
递归地扫描目录中的 git 仓库,并打印每个仓库的状态。
历史
- 受 https://github.com/albenik/git-summary 启发
- 这实际上来源于: https://github.com/MirkoLedda/git-summary
- 它是由 https://gitlab.com/lordadamson/git-summary 分支出来的
- 所有这些都是从这个 Gist 开始的 https://gist.github.com/mzabriskie/6631607
为什么要重写?
我真的很喜欢这个项目,但我有很多仓库处于奇怪的状态(detached HEAD),bash 脚本的错误处理也不尽人意。我还想调整一些行为和格式。
用法
git-summary
Runs a "git status" like operation in an entire directory tree.
Status Legend:
? - Untracked files
+ - Uncommitted new files
M - Modified files
^ - Your branch is ahead of upstream
v - Your branch is behind of upstream
X - Issue attempting to fetch from upstream
USAGE:
git-summary [FLAGS] [OPTIONS] [path]
FLAGS:
-v Sets the level of verbosity (-v warn, -vv info, -vvv debug, -vvvv trace)
-l, --list Just print a list of all git repos
-q, --quiet Print nothing for repos that are up to date.
-f, --fetch Perform a 'git fetch' in each repo before checking for unpushed/unpulled commits.
--hidden Check for git repos in hidden directories
--shallow Only search the directory provided, do NOT recurse.
-h, --help Prints help information
-V, --version Prints version information
OPTIONS:
--parallel <parallel> Max number of workers
ARGS:
<path> Path to folder containing git repos; if omitted, the current working directory is used
依赖
~14–24MB
~401K SLoC