Skip to main content

生成假 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.1.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.1-py3-none-any.whl (6.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: fake_commit-0.1.1.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.1.tar.gz
Algorithm Hash digest
SHA256 3f029f86ea1c63d4fb42c48b4b6a2ee7d2dc0b2ed8ce29e4ec11d87ef1786391
MD5 d47b722bc057cde99a10a6fb1af03caf
BLAKE2b-256 53a6c6d81736880a237cc7eb0a8c75cea01cb0569ec34c4156c217b8a7677822

See more details on using hashes here.

File details

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

File metadata

  • Download URL: fake_commit-0.1.1-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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 83657adcf3baf7995aa7f7bf7945ac59d53100abf3db9964d06c2a7bf9f98ba6
MD5 9233ef601b36461d43f75d5cc2c50e3a
BLAKE2b-256 afa8569a865e05527e6da388b605687c359fe309e6da4394f8c130cbae1101a9

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