Boring Background - Summary: I know we're not using GIT properly!.
This started as a small hobby project and has spiralled - my company uses Git to track/manage changes to a bespoke web-based software platform and act as a central repository. Approximately 300 mobile devices are then set to pull to a local cloned repository on start up from a self-hosted intranet server so that they may access the latest version of the software when not connected to the network (we make use of branches so that they are only exposed to mature/tested code).
We've now moved on a step - we have a database of "parts" that is updated daily. I have created a separate version of this database using cron scripts to create a standalone version that could be opened on a local "unconnected machine".
My Problem
I have a set of PHP scripts that take database table data and export it into the flat file format required by the application, and copy any additional images since last cycle into the correct locations. All files are stored in /var/www/clonedrepository
I then want to run the following commands on the directory:
git add .
git commit -m "Automatic update: todaysdate"
git push
The repository is cloned from /home/git/repository which is served using the git deamon and apache symlink allowing http access (for dumb device cloning) and SSH (for grownups to edit/update).
The problem is, I'm a web programmer and I'm out of my depth. I set up the git repositories and am comfortable with the command line, but I don't know the best place to start.
Side note: There will never be conflicts as no user will edit the data files and the system will not edit anything other than the data files.
So in summary, I've got a central repository on my Ubuntu Linux box (/home/git/repository) that I would like to update daily from a cloned repository (/var/www/clonedrepository) on the same box.