📅  最后修改于: 2023-12-03 15:27:20.122000             🧑  作者: Mango
私人仓库 git history api - Shell-Bash 是一个基于Shell-Bash脚本的API工具,用于查询私有Git仓库的提交历史和统计数据。该工具可以帮助程序员更好地了解仓库的变化和代码质量,从而优化代码开发流程。
$ git clone https://github.com/username/repo.git
$ cd repo
$ chmod +x git-history-api.sh
$ ./git-history-api.sh --repo=/path/to/repo.git --start-date=2022-01-01 --end-date=2022-01-31
或
$ ./git-history-api.sh --repo=ssh://git@example.com/path/to/repo.git --start-date=2022-01-01 --end-date=2022-01-31
| 参数 | 说明 | | ----------------- | ------------------------------------------------------------ | | --repo=/path/to/repo.git | Git仓库的路径或URL地址 | | --start-date=2022-01-01 | 开始日期,格式为 yyyy-mm-dd | | --end-date=2022-01-31 | 结束日期,格式为 yyyy-mm-dd | | --author=username | 指定作者 | | --branch=master | 指定分支 | | --output=markdown | 输出格式,支持markdown和json,默认为markdown |
# Git Commit History
Repository: /path/to/repo.git
Period: 2022-01-01 ~ 2022-01-31
## Commits
| Author | Date | Message |
|--------|------|---------|
| Alice | 2022-01-02 | add feature A |
| Bob | 2022-01-05 | fix bug B |
| Charlie | 2022-01-11 | update documentation |
| Alice | 2022-01-15 | add feature C |
| Alice | 2022-01-25 | refactor code D |
## Contributors
| Author | Commits | Insertions | Deletions | Files Changed |
|--------|---------|------------|-----------|---------------|
| Alice | 3 | 100 | 50 | 10 |
| Bob | 1 | 20 | 10 | 5 |
| Charlie | 1 | 30 | 15 | 2 |