Reference
How to git add crontab
# cd /var/spool/cron
# git init
Initialized empty Git repository in /var/spool/cron/.git/
# git add *
# git commit -m "20180119"
[master (root-commit) 6d7b375] 20180119
Committer: root <root@>
Your name and email address were configured automatically based
on your username and hostname. Please check that they are accurate.
You can suppress this message by setting them explicitly. Run the
following command and follow the instructions in your editor to edit
your configuration file:
git config --global --edit
After doing this, you may fix the identity used for this commit with:
git commit --amend --reset-author
2 files changed, 6 insertions(+)
create mode 100644
create mode 100644 root
How to restore
# git reset --hard HEAD
HEAD is now at 6d7b375 20180119