Making git auto-commit

前端 未结 18 1725
面向向阳花
面向向阳花 2020-11-27 08:41

I\'d like to use git to record all the changes to a file.

Is there a way I can turn git \'commit\' on to automatically happen every time a file is updated - so ther

18条回答
  •  -上瘾入骨i
    2020-11-27 09:27

    Two solutions that I like are etckeeper -- which can be adapted to a custom directory other than /etc:

    mkdir /foo
    etckeeper -d /foo init`
    etckeeper -d /foo commit 'message'
    

    And gitwatch -- specially the instructions of how to use it with supervisord.

提交回复
热议问题