I have a CENTRAL bare repository that has three developer repositories pulling and pushing to it normally.
I also have two other repositories that pull from the CENTRAL bare repo: one is the live server, and the other is a test/stage server—each pulling from its own respective branch.
The scenario is this: I have a post-update hook script on the CENTRAL repo that automatically accesses the test and lives repos and runs a pull command on each. This updates both test and live servers, all depending on what branch has new commits. This all works great.
The problem is this: there may be times in an emergency that files may be directly updated on the server (via FTP or whatever) and the CENTRAL post-update script will then fail since merge/overwrite conflicts will occur. There is no way to avoid this scenario, and it is inevitable.
What I would like to have happened is this: I want the pull from the live and test sites to always overwrite/merge on the pull. Always. These repos will be pull-only as they are not for development.
In all my research, I cannot find a good solution to have a pull always force an overwrite of the local files. Is this at all possible? It would make for a great development scenario if so.