https://github.com/norm/autocommit
Automatically commit changes to a git repository
https://github.com/norm/autocommit
Last synced: about 1 year ago
JSON representation
Automatically commit changes to a git repository
- Host: GitHub
- URL: https://github.com/norm/autocommit
- Owner: norm
- Created: 2020-09-27T07:00:56.000Z (almost 6 years ago)
- Default Branch: main
- Last Pushed: 2020-10-02T06:06:00.000Z (over 5 years ago)
- Last Synced: 2025-01-19T10:32:52.584Z (over 1 year ago)
- Language: Shell
- Size: 6.84 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.markdown
Awesome Lists containing this project
README
# autocommit
Script to watch a git repository for changes, then commit and push them
automatically.
I use this to back up the notes I keep in [nvAlt][nv] (even
though I also sync them to [Simplenote][sn]).
[nv]: https://brettterpstra.com/projects/nvalt/
[sn]: https://simplenote.com
## Usage
autogit [-h] [-b branch] [-r remote] [-s sleep] source_dir [repo_dir]
* `source_dir`
the directory to watch
* `repo_dir`
optional second directory to act as a git repository that `source_dir` is
copied to if the source is not itself a git repository
* -h
print help
* -b *branch*
use *branch* as the remote branch to push to. Defaults to `main`.
* -l *seconds*
use I as the latency for fswatch (how long between batches of
notifications). Default is 4.0. Larger values are useful when multiple
sizeable files are changed as part of a single operation (eg saving
binary files).
* -r *remote*
use *remote* as the remote target to push to. Defaults to `origin`.
* -v
be more verbose about file changes, even when they are ignored