For the project I am working on, we decided to develop a tool to help the development, so this is something that should not be in production.
So I was wondering, as git is so awesome, if maybe there was a feature to prevent some files (yes, only files: this is a Magento project and the tool we are going to develop will be in his own module, no intersection with the rest of the application) to be merged into master, but should be available in other branches.
We are thinking in using git-flow, if that helps. So we would have master, from which we'll create develop, from which will create all our feature branches. The idea would be to have this module in develop but never merged back into master.
I am thinking now, something like ignoring those files (.gitignore) only in the master branch, would that work?
edit 1: project structure
I feel I have to give more info about the structure of the project, here it comes:
+ main_folder/
+ magento/
|---+ app/
| |--+ code/
| | |--+ community/
| | |--+ core/
| | |--+ local/
| | |--+ Namespace1/
| | |--+ Module1/
| | |--+ Module2/
| | |--+ Namespace2/
| | |--+ Module1/
| | |--+ Module2/
| |--+ design/
| | |--+ frontend/
| | |--+ default/
| | |--+ default/
| | |--+ layout/
| | |--+ template/
| + js/
| + lib/
+ ezpublish/
the development tool module will have to be included in the main project (only the magento part) in differents places, i.e. app/code/local/Namespace1/Module3/, app/design/frontend/layout/dev.xml, app/design/frontend/template/dev/tool.phtml and js/dev/
edit 2: submodule option
exploring @VonC's answer, here is what I've done:
devtool merge=ours
but the submodule in master has the content of the last commit, and if I checkout the inital commit in master and checkout back to develop, the initial commit is still there (when I want the last commit in develop).
So I am obviously doing something wrong, but what?
I would really recommend to use a submodule to isolate a set of files in its own repo.
The idea is: if you are using a submodule, all you need to do in your parent directory is to prevent the merge of one element (and only one): the special entry recording the SHA1 of said submodule.
You don't have to worry about the merge of the submodule files.
You can:
master
devel
' branchdevel
and master
..gitattributes
directive.)If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With