In our project, we try to stay close to the "official" git workflow, as suggested here:
http://www.kernel.org/pub/software/scm/git/docs/gitworkflows.html
We use the branch masterand next, start branching from master, regularly test integration into next, and if the branch is completed, we merge it into master.
Now sometimes it happens that there is some development on topic-X. The developer creates somefile.cand adds the code that he needs for his theme. After some time, another developer works on topic-Yand finds out that he also needs to create somefile.cand even need a part of this file from topic-X- but not the complete file, since it also contains code that applies only to topic-X. It may also need to add other code to this file.
If you topic-Xwill be a full and integrated with master, it would be easy: we might have to reinstall topic-Yon masterto make this code available. But what if both topics are still incomplete?
Since topic-Xthey are topic-Yreally not interconnected, with the exception of this small common code somefile.c, how can we avoid combining them with each other and still provide both developers with common parts from somefile.c?
If we create a new copy somefile.cin topic-Yonly with the appropriate parts, we find that later we get merge conflicts when we test integration in next. Is there an alternative?
source
share