git提交时间机器。
git-ctm的Python项目详细描述
git ctm=git commit时间机器
有时需要创建具有特定时间戳的提交。 git ctm提供了一个命令行工具ctm,用于轻松提交所需的时间戳:
$ ctm -d 'Thu Feb 8 03:14:15 2018 +0200' -m 'my commit message'# is the same as $ GIT_AUTHOR_DATE='Thu Feb 8 03:14:15 2018 +0200'\ GIT_COMMITTER_DATE='Thu Feb 8 03:14:15 2018 +0200'\ git commit -m 'my commit message'
此项目中的所有提交都使用ctm本身完成。
安装
从PyPI使用pip包管理器:
pip install --upgrade git-ctm
或者从github安装最新的源代码:
pip install https://github.com/pavdmyt/git-ctm/archive/master.zip
或者把ctmPEX(python可执行文件)放在$PATH:
$ git clone https://github.com/pavdmyt/git-ctm.git
$ cd git-ctm
$ sudo cp ctm /usr/local/bin/
现在应该可以使用ctm命令行工具,请尝试:
ctm --version
用法
$ ctm --help
Usage: ctm -d <date> -m <msg>
ctm -p
-d <date> Commit date and time
-m <msg> Commit message
-p Print date template
--help Print usage
--version Print version
开发
克隆存储库:
git clone https://github.com/pavdmyt/git-ctm.git
安装依赖项:
make install-dev
lint代码:
make lint
贡献
- 叉开!
- 创建功能分支:git checkout -bmy-new-feature
- 提交更改:git commit -m 'Add some feature'
- 推到分支:git push origin my-new-feature
- 提交拉取请求
- 确保测试通过
许可证
麻省理工学院-Pavlo Dmytrenko