https://github.com/weakish/git-ci-mtime
`git-ci-mtime` is a git plugin to commit a `file` using its `mtime` as auth date.
https://github.com/weakish/git-ci-mtime
Last synced: 8 months ago
JSON representation
`git-ci-mtime` is a git plugin to commit a `file` using its `mtime` as auth date.
- Host: GitHub
- URL: https://github.com/weakish/git-ci-mtime
- Owner: weakish
- License: other
- Created: 2016-09-04T05:27:21.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2016-09-04T05:29:55.000Z (almost 10 years ago)
- Last Synced: 2025-01-12T18:12:01.606Z (over 1 year ago)
- Language: Shell
- Homepage:
- Size: 11.7 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
`git-ci-mtime` is a git plugin to commit a `file` using its `mtime` as auth date.
Install
--------
### With `make`
```sh
; make
```
Files will be installed to `/usr/local/bin`.
If you want to install other place, edit `config.mk` before running `make`.
Makefile is compatible with both GNU make and BSD make.
### With basher
```sh
; basher install weakish/git-ci-mtime
```
### Manually
Copy `git-ci-mtime.sh` to `$PATH/git-ci-mtime`.
Usage
------
```sh
git ci-mtime FILE_TO_COMMIT [--more-git-options]
```
Equivalent git commands:
```sh
git add FILE_TO_COMMIT
git commit --date 'mtime of FILE' FILE
```
You can pass more git options **after** `FILE`:
```sh
git ci-mtime FILE --gpg-sign -m 'accept any options git commit accepts'
```
You can commit multiple files:
- The auth date will be the `mtime` of the first file.
- Same as above, other files must be passed **after** `FILE`.
- `git ci-mtime * -m 'glob'` should work since `$SHELL` probably will expand
`*` for you (unless you are running your interactive `$SHELL` with `set -f`
or `$SHELL -o noglob`).
License
--------
0BSD