How to commit classes and interfaces in two different functional branches (git flow eclipse)
I use Eclipse with the Git Flow extension. I tried committing interfaces and classes in two different functional branches. After committing the interface for the first time in the first functional branch, I want to do the same with the class. But the class has an error because some part of the code is not recognized (e.g. variables, methods, etc.) because this part of the code is in another branch. What can I do?
Solution
You cannot separate an interface from a concrete class.
You can do two things:
- Commit the interface on your development branch and the concrete class after opening the feature branch
You create interfaces and classes in two different functional branches, but in concrete classes you must annotate the implementation command ex:
class Concrete /* implements myInterface */ {
In the second case, you have two correct functional branches, and after merging you must remove the comment tags by specific class.