Systematic Architecture [EN]
The blog on systems development/architecture, to be a beautiful, artistic one.
Monday, 24 September 2018
How to git commit automatically on Mac
# Git Auto Commit on Mac How to git commit automatically on Mac ## Protocol ### Install `fswatch` ```bash $ brew install fswatch ``` ### Run detection A command line here is an example. ```bash $ cd
$ fswatch -0 . -l 10 -e "\\.git.*" | xargs -0 -n 1 -I{} sh -c 'git add .; git commit --author="Author automatic
" -m "auto commit changes.";' ``` ### Edit anything ## Caveat 1. Don't use `git commit -am` because -a doesn't treat a new file. 1. Better to put .gitignore first to prevent exhaustive detection. 1. Better to create a branch for this auto committing because the commit history gets messy about. 1. Set a latency not to commit too sensitive changes, e.g. `-l 10`. Cf. https://github.com/lamusique/GitAutoCommitOnMac/
Newer Posts
Older Posts
Home
Subscribe to:
Posts (Atom)