I know it's been answered before, but i didn't make much sense of the answers. I have a repository with two branches that run in parallel. One is master and the other one is seed. The seed and master branches contain two files that are needed for local and live server environments, so they differ. Seed has configurations for local, master for live.
From time to time, i want to merge the master branch into the seed branch to get it up to speed, but i want to exclude from the merge, the two respective files.
I tried creating a .gitignore file and adding the files there, however this only affects push/pull to the repository. If i modify file A in the master, that's supposed to be ignored, when i merge the master branch into the seed branch, the file is in the seed branch with the modifications i made in the master. This i want to avoid, so that any modifications of file A in the master branch does not carry over to the seed branch upon merge (and viceversa!).