Making git auto-commit

前端 未结 18 1736
面向向阳花
面向向阳花 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条回答
  •  执念已碎
    2020-11-27 09:33

    It sounds like you're looking for something similar to etckeeper, which is designed to automatically check all your changest to /etc/* into git (or whatever VCS you want), but I see no reason it couldn't be used with files other than those in /etc.

    If you only want to deal with one single file, maybe that wouldn't be perfect, but if you want to keep track of everything in a given directory, I think it's worth checking into.

提交回复
热议问题