3 ms·
I use this script called "autocommit" and run it in the background in a tab. It commits every 1 second. Echo to the file current-task to change the commit mess
by samsquire 4y ago
I use this script called "autocommit" and run it in the background in a tab.
It commits every 1 second. Echo to the file current-task to change the commit message from that point onwards. If you have no changes, the commit is a no-op.
#!/bin/bash
while true; do
sleep 1
(git status -z;
git add . && git commit -m "autocommit $(cat ../current-task)" ; git push);
done > autocommit.log 2>&1
I actually use it from host machine to push to a development virtual machine without vagrant.
I use a bare GitHub repo in the shared folder in virtual box with a git hook to trigger a build in the virtual machine.
See here
https://GitHub.com/samsquire/local-development https://GitHub.com/samsquire/local-development