Keeping local changes
===

Say I have a file in a git repo:


	#file.py

	setting1 = default1
	setting2 = default2

	<some code>


Now I want to make some local changes that don't get pushed back into the repo


	#file.py - local change

	setting1 = mysetting1
	setting2 = mysetting2

	<some code>

Say sometime in the future the upstream repo is updated, and I want to pull down their changes without messing up my local settings. I.E a git command I could run that would update the file so that it would be

	#file.py - updated copy

	setting1 = mysetting1
	setting2 = mysetting2

	<new code>

Is there some way to do this, either with branches or some other git feature where I don't have to put local settings in a separate file?

I've seen several other questions like this, but they focus on excluding a whole file.

Thanks