Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there any way I can auto backup config file to github?

I want to automatically backup my .zshrc file and some sublime setting files to Github.

I think there is two ways to do this:

  1. Detect file changes, when a file changes, pushed it to Github immediately.
  2. Stage files by a fixed time period, like one day one backup.

Is there a graceful and specific way?

like image 224
Tim Avatar asked Dec 10 '25 23:12

Tim


1 Answers

You can use this gitwatch project which uses inotifywait to detect change and git add / commit / push to remote

You can then create a background service executing this script with the required parameters triggered on boot

like image 129
Bertrand Martel Avatar answered Dec 13 '25 17:12

Bertrand Martel



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!