I have a git bare repo on production server:
/home/username/railsapp.git
Now I would like to have a copy to use with mod_rails. Something like:
/home/username/railsapp/
What is the best way to copy the files from the repo to the “production” directory?
Should I do something like a shallow clone?
The usual way to “pull” the files out of a bare git repository is indeed to clone the repo and then pull it every time you need to update it.
You can also use hooks to automatically update the code used in production when it’s pushed to the repository, but that’s another topic.