title: Keeping local changes in git while pulling from remote
body: <p>Say I am working on a shared repo. In that repo is a <code>defaults.js</code> file that specifies various URLs. When I clone the repo locally, I change some of these URLs to point at services that are running locally. How can I keep these URLs set to the local values, while pulling new updates from remote? </p>
  
  <p>So far I have been happily (naively?) using the method described <a href="https://stackoverflow.com/questions/10414769/git-pull-keeping-local-changes">here</a></p>
  
  <pre><code>git stash
  git pull
  git stash pop
  </code></pre>
  
  <p>but while trying this today I received a </p>
  
  <blockquote>
    <p>CONFLICT (content): Merge conflict in config/defaults.js</p>
  </blockquote>
  
  <p>Since we rebase rather than merge, I didn't want to start creating messy merges, particularly for something so trivial. So I just reset, got rid of my changes so local mirrored remote, and then manually changed the URLs again. Obviously, I don't want to keep doing this, what is the preferred approach?</p>
  
  <p>The solution in the link above says to simply </p>
  
  <pre><code>git checkout --theirs -- defaults.js
  </code></pre>
  
  <p>because you know that what you put in the stash is what you want. But that's not true in my case, I do want a merge of mine and theirs, without actually merging.</p>