Skip to main content

生成假 git 提交历史的 CLI 工具

Project description

fake-commit

生成假 git 提交历史的 CLI 工具,让你的提交记录看起来更真实。

功能特点

  • 支持指定日期范围生成提交
  • 支持固定提交次数模式
  • 支持随机提交次数模式
  • 每次提交使用随机时间戳,更真实
  • 零依赖配置,即装即用

安装

pip install fake-commit

或使用 uv:

uv pip install fake-commit

或直接从源码安装:

uv tool install .

卸载

uv tool uninstall fake-commit

或通过 pip:

pip 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

或安装后:

fc -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.0.tar.gz (44.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

fake_commit-0.1.0-py3-none-any.whl (6.7 kB view details)

Uploaded Python 3

File details

Details for the file fake_commit-0.1.0.tar.gz.

File metadata

  • Download URL: fake_commit-0.1.0.tar.gz
  • Upload date:
  • Size: 44.3 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

Hashes for fake_commit-0.1.0.tar.gz
Algorithm Hash digest
SHA256 4df02f0538aa78c4f7ec53be270480d6b27924e79b3dc37126ff0cdb44a39ad7
MD5 a31ede9fda5befcface21ab638641702
BLAKE2b-256 4f1f7fb55408eae324db9b219fb0977db2882a29ae8bab5035a38afa89fa48da

See more details on using hashes here.

File details

Details for the file fake_commit-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: fake_commit-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 6.7 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

Hashes for fake_commit-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6c0ecd4c52873850aef24200188df2e90eeb4ee1d8f4e5e6ee9d1827f4924c80
MD5 0f4364257e0c944cc4ac74ecae6c9dc0
BLAKE2b-256 4e82bf791b026e2cdc81bbe1e03a03b46571a45596f07aae37d76c033bc18470

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page