I have a repository with two branches: live and stage. The repository holds code for a web based application. I would like to maintain two different .htaccess files for the stage and live branches, but still keep them version controlled, since the nature of serving a stage site is a little bit different (right now for instance, I want the caches to be timed differently).
I'm a novice with git so there is probably an easy explanation, but I'd like to have a workflow where when I was in live and I pulled changes (simple git merge stage
), I didn't overwrite the existing .htaccess in the live branch. Is there any way to configure this? Am I missing some big concept in git?
Likewise, there is also a chunk of a (but possibly many) .html files where I would like to keep track of changes but not merge them back into live. Just to be clear I want live and stage to got keep track of changes in these files, but know not to merge those certain changes when doing merges.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…