you are viewing a single comment's thread
view the rest of the comments
[–] 5 points 4 months ago (5 children)

If you want simple, just commit unconditionally every x minutes with cron. It won't do anything if there's nothing to commit

  • source
  • hideshow 5 child comments
  • [–] 2 points 4 months ago

    Greybeard dev here, just stepping by to say I would do the same, this works and does nothing weird if there is nothing to commit.

    I don't know what the problem of the other crying person is, but robust IO watching should not be done in bash and whatever the fancy solution is it will not work as reliably as this.

  • source
  • parent
  • [+] -12 points 4 months ago (3 children)
  • [–] 6 points 4 months ago (2 children)

    Before showing your terrible understanding of git, try it. If you run 'git commit -m auto foo' and foo has not changed, git will not do anything. It's a no-op. So there is no downside and is very simple. Additionally, it returns 1, so if you do 'git commit -m auto foo && git push', it won't do the push.

    But thanks for playing

  • source
  • parent
  • hideshow 2 child comments