I'd like to edit the Apache configuration on Linux so that the changes of every git pull doesn't reflect right away.
I'd like it to only stage after Apache is restarted.
What would be the best approach to this?
I wouldn't change the Apache configuration, but rather what Apache manages.
It can show the content of a git repo, but that should not be the one where the changes are done.
You can have two repos:
git clone first/repo path/to/second/repo # make Apache serve path/to/second/repo
When restarting Apache, add before the apachectl start:
cd path/to/second/repo git pull