生成假 git 提交历史的 CLI 工具
Project description
fake-commit
生成假 git 提交历史的 CLI 工具,让你的提交记录看起来更真实。
功能特点
- 支持指定日期范围生成提交
- 支持固定提交次数模式
- 支持随机提交次数模式
- 每次提交使用随机时间戳,更真实
- 零依赖配置,即装即用
安装
推荐使用 uv 安装:
uv tool install fake-commit
或直接从源码安装:
git clone https://github.com/esyion/fake-commit.git
cd fake-commit
uv tool install .
卸载
uv tool uninstall fake-commit
配置
复制 .env.example 为 .env,配置以下环境变量:
必需配置
| 环境变量 | 说明 |
|---|---|
FAKE_AUTHOR_NAME |
Git 提交用户名 |
FAKE_AUTHOR_EMAIL |
Git 提交邮箱 |
可选配置
| 环境变量 | 默认值 | 说明 |
|---|---|---|
FAKE_START_DATE |
2026-01-01 | 开始日期 |
FAKE_END_DATE |
2026-01-31 | 结束日期 |
FAKE_BRANCH |
main | 分支名 |
FAKE_COMMITS_PER_DAY |
1 | 每天提交次数(固定模式) |
FAKE_RANDOM |
false | 是否启用随机模式 |
FAKE_RANDOM_RANGE |
1,10 | 随机提交区间(格式:min,max) |
使用方法
固定模式
每天固定生成指定次数提交:
FAKE_RANDOM=false
FAKE_COMMITS_PER_DAY=3
随机模式
每天随机生成 1~10 次提交:
FAKE_RANDOM=true
FAKE_RANDOM_RANGE=1,10
运行
python -m src.main
或安装后:
fcmt -n "用户名" -e "email@example.com"
示例输出
开始生成提交历史...
作者: esyion <qingboup@gmail.com>
日期范围: 2026-01-01 - 2026-01-31
完成!共生成 93 次提交
注意事项
- 生成提交会创建
.commit_marker文件作为提交内容 - 每次提交使用当天随机时间戳(小时:分钟:秒)
- 建议在测试仓库中使用
License
MIT
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
fake_commit-0.1.2.tar.gz
(45.5 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file fake_commit-0.1.2.tar.gz.
File metadata
- Download URL: fake_commit-0.1.2.tar.gz
- Upload date:
- Size: 45.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.17 {"installer":{"name":"uv","version":"0.11.17","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
84548ce5dca2adf928ef06161391806cddb4e11118fc23efb3234d4b0b27758b
|
|
| MD5 |
99bc558323365bcf0d595bee3cff2eda
|
|
| BLAKE2b-256 |
29d519f849bfe7317f9b46b42acccdc8f0642aad7d807841c4946d023631b97c
|
File details
Details for the file fake_commit-0.1.2-py3-none-any.whl.
File metadata
- Download URL: fake_commit-0.1.2-py3-none-any.whl
- Upload date:
- Size: 7.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.17 {"installer":{"name":"uv","version":"0.11.17","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7dd8acab241cf4edc45811123297cbd44bbd9f5cddfc51341ecc2bb5ffaa1674
|
|
| MD5 |
5f930b8281769e98f35e554c96303691
|
|
| BLAKE2b-256 |
b450804044f7d98aa2aee6ea7a68a11b798d4858764b6573761b808151f9d8ed
|