title: What's the best practice for handling system-specific information under version control?
body: <p>I'm new to version control, so I apologize if there is a well-known solution to this. For this problem in particular, I'm using git, but I'm curious about how to deal with this for all version control systems.</p>
  
  <p>I'm developing a web application on a development server. I have defined the absolute path name to the web application (not the document root) in two places. On the production server, this path is different. I'm confused about how to deal with this.</p>
  
  <p>I could either:</p>
  
  <ol>
  <li>Reconfigure the development server to share the same path as the production</li>
  <li>Edit the two occurrences each time production is updated.</li>
  </ol>
  
  <p>I don't like #1 because I'd rather keep the application flexible for any future changes. I don't like #2 because if I start developing on a second development server with a third path, I would have to change this for every commit and update.</p>
  
  <p>What is the best way to handle this? I thought of:</p>
  
  <ol>
  <li><p>Using custom keywords and variable expansion (such as setting the property $PATH$ in the version control properties and having it expanded in all the files). Git doesn't support this because it would be a huge performance hit.</p></li>
  <li><p>Using post-update and pre-commit hooks. Possibly the likely solution for git, but every time I looked at the status, it would report the two files as being changed. Not really clean.</p></li>
  <li><p>Pulling the path from a config file outside of version control. Then I would have to have the config file in the same location on all servers. Might as well just have the same path to begin with.</p></li>
  </ol>
  
  <p>Is there an easy way to deal with this? Am I over thinking it?</p>