title: How to automate the updating of files if files are modified using bash and git?
body: <p><strong>The scenario:</strong>
  User wants to keep a repository on a server, weather it be Github or just any server which has Git installed, with all his dotfiles which he can upload his changes to which he makes to his dotfiles on his local machine. And he wants it to be automated so that every Nth day a job starts to check if his local dotfiles have been modified and if so the modifications get committed and pushed up to the server which contains the dotfile repository. The user keeps a local git repository under a home folder called .dotfiles/ and symlinks his dotfiles to the files under .dotfiles/.</p>
  
  <p>Also, when the user sets up a new operating system he wants to fetch those same dotfiles from the server for his new OS.</p>
  
  <p><strong>The problem:</strong>
  User knows some bash programming, some general programming and some Git commands, but has no clue how to implement such a thing like this.</p>
  
  <p><strong>The question:</strong>
  How does one create a thing like this?</p>
  
  <p><strong>EDIT:</strong></p>
  
  <p>Lets narrow this down.</p>
  
  <p>How do I do automation in the shell. A job which happens every Nth day? I can handle the Git part an all that. I just need to know how to start a job automatically in the shell.</p>
  
  <p>F.ex.  job starts every Nth day to check for a given condition. I my case if the date of any of my dotfiles is newer than the date of the files in my local repo. If date is newer then the job runs a script which I write which handles the updating of everything. I know how to write the script for handling the updating of my files, I just don't know how to do this automation to check for the condition.</p>
  
  <p>How do you do the automation?</p>