I'm working on a (Django) website with two branches: master
and dev
.
master
is the production version and no work should be done here directly. All the changes should come from merging dev
branch, once it is considered to be stable.
dev
, as you may guess, is the development branch and all the changes are made here (and subbranches).
In the server I have two websites working, the production one (uses master
branch) and another private for development, with dev
subdomain that uses dev
branch.
The problem is that all the configuration files, static files (images, etc.) are inside the control version to be able to easily push them to the server. But, if these kind of files (static, config...) are modified in dev
to just debug in the server and then I need to merge with master... How can I set some files and dirs to be ignored when merging dev into master?
I've been searching and I've found some related questions, but they tell you to use .gitattributes
with merge=ours
. However, this approach has a big caveat: it only applies the strategy if the file is modified in the two branches, but this isn't my case.
Any tips on how should I go on?