As part of the project that I am working on, we decided to develop a tool that helps development, so this should not be in production.
So I was wondering, since git is so awesome, if perhaps there is a function to prevent some files (yes, only files: this is a Magento project, and the tool we are going to develop will be in its own module, not overlap with the rest part of the application), which should be combined with the master, but should be available in other branches.
We are thinking of using git-flow if that helps. Thus, we will have a wizard from which we will create a development, from which we will create all our function branches. The idea was for this module to develop, but never merge back into the master.
Now I think something like ignoring these files (.gitignore) only in the main branch, will this work?
edit 1: project structure
I feel like I need to know more about the project structure, here it is:
+ 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 should be included in the main project (only part of the magenta) in different 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 answer , here is what I did:
- in the main server:
- git subodule add git @ github.com: path /to/submodule.git devtool
- cd devtool
- git checkout 123abC # submodule initial commit
- cd ..
- git add devtool
- git commit -m " "
- :
- cd devtool
- git checkout abc213 #submodule last commit
- cd..
- git devtool
- git commit -m " "
- :
- touch.gitattributes
- in.gitattributes :
devtool merge=ours
- git .gitattributes
- git commit -m ". "
master , master checkout , ( , ).
, , - , ?