If you specify your store code setup in app/etc/local.xml and remove the store URLs from the core_config table of the database then you can easily run the same DB on localhost and remote.
Add a 'default' section to app/etc/local.xml, this section being inside 'config'
<default>
<web>
<unsecure>
<base_url><![CDATA[http://local.localtest.me/]]></base_url>
<base_web_url>{{unsecure_base_url}}</base_web_url>
<base_link_url>{{unsecure_base_url}}</base_link_url>
<base_js_url>{{unsecure_base_url}}js/</base_js_url>
<base_skin_url>{{unsecure_base_url}}skin/</base_skin_url>
<base_media_url>{{unsecure_base_url}}media/</base_media_url>
</unsecure>
<secure>
<base_url><![CDATA[https://local.localtest.me/]]></base_url>
<base_web_url>{{secure_base_url}}</base_web_url>
<base_link_url>{{secure_base_url}}</base_link_url>
<base_js_url>{{secure_base_url}}js/</base_js_url>
<base_skin_url>{{secure_base_url}}skin/</base_skin_url>
<base_media_url>{{secure_base_url}}media/</base_media_url>
</secure>
</web>
</default>
Use that just on your localhost and take the local.xml file out of version control. On the live server replace the URLs given above to the live ones.
Now in your db you will need to remove the keys in core_config_data
for base_url etc.
At runtime the settings will be merged into one huge configuration object that gets cached.