Ignore some files during branch merging

jawad_abbasi December 21, 2019

Hi Git community, 

I have two branches master and develop. Each branch contains a same file named "db.config" having a seperate db credentials for production(master) and staging(develop).  

Master branch also have .gitattributes file in which i defined a merge=ours strategy for db.config file

.gitattributes

db.config merge=ours

When i merge develop into master branch by creating a pull request then changes in develop branch also goes to master after merge. It looks like .gitattributes doesnot work for me. 

Does anyone know how i get rid out of this? 

0 answers

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events