Say I am working on a shared repo. In that repo is a defaults.js
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?
So far I have been happily (naively?) using the method described here
git stash
git pull
git stash pop
but while trying this today I received a
CONFLICT (content): Merge conflict in config/defaults.js
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?
The solution in the link above says to simply
git checkout --theirs -- defaults.js
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.