I have a folder that I want to publicly share with others, the content of the folder suppose to be updated daily: some files gonna be changed, some are deleted, some are added. I would like to use GitHub for that and create a cronjob that supposes to handle the repository updates. What kind of git commands do I have to use if I always want to have an exact copy of the local folder on my git repository.
This is the code that I am planning to use but I have doubts about locally deleted files (if it is cover them or not)♂️:
cd ~/myfolder
git init
git add .
git commit -a -m "$current_date"
Thank you.