This is for simple git push script for notes, bookmarks and other useful text content which needed to store in remote repository. it can push daily or you can make this easily.
- Go to your content folder and git init and make a remote repository and add into your project. if you already did this step ignore 1st step
git init
git remote add origin <remote_url>
- Download sync.sh file to your content folder where git init happened.
- Open sync.sh file and add your path to PROJECT_PATH variable
PROJECT_PATH="/your_project_path"
- Make it executable
sudo chmod +x sync.sh
- Then add script to crontab to shedule the run times
crontab -e #(To set value)
Then add repeating time period
minute hour day month day_of_week <absolute_path/sync.sh>
example:
24 10 * * * /your_path/sync.sh #(this will do everyday 10.24 am ["*" means any])