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 wit
You should always separate historization (what a Source Control is for) from deployment.
A deployment involves:
Amongst the various operation a deployment does, you should include a de-variabilization phase.
A variable is a keyword representing anything likely to change depending on your deployment platform (which can be a PC for continuous integration, a linux for basic homologation, an old Solaris8 for pre-production homologation, and a Full F15K Solaris10 with zones for production: it short it can varies a lot). See Jonathan Leffler's answer for practical examples.
A variable can represent a path, a JVM version, some JVM settings and so on, and what you are putting in an SCM should be a data with variables in it, never hard-coded settings.
The next step would be to include in your executable a way to detect any change in a setting files in order to update while running some parameters (avoiding the the all "shutdown / change settings / restart" sequence).
That means they are two types of deployment variables: