This seems odd to me. Why would you need to commit every second?

And push to remote as well? Seems not thought out