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.3.tar.gz (45.5 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.3-py3-none-any.whl (7.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: fake_commit-0.1.3.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

Hashes for fake_commit-0.1.3.tar.gz
Algorithm Hash digest
SHA256 98b1dececa94f820ea3acb61dd3bd67d433ec747d704da7ab4ccda702feaed45
MD5 ac285d8c6c1fc386273fa6409d8f9db3
BLAKE2b-256 23f5f33a5c449c1c62ae43b8aac11bde5e838fb9e60848b6672434daae86b32e

See more details on using hashes here.

File details

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

File metadata

  • Download URL: fake_commit-0.1.3-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

Hashes for fake_commit-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 689243300c09829f141e9621607f95526cff1315efebc1122b63c6481120b9ed
MD5 0741a00061b4fff648ac65747da917f0
BLAKE2b-256 477616622accc0fce9de982408b4c0e3c9b9ee83f3accaa58681ca76df4348e3

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