How can I commit the class and the interface in two different features branches (git flow eclipse)

Viewed 135

I use Eclipse with Git Flow extension. I try to commit interfaces and classes in two different features branches. After the first commit of the interface in the first feature branch I want to do the same with classes. But the classes have mistakes because some part of code do not be recognized (for example variables, methods etc) because this part of code is in the other branch. What can I do?

1 Answers

You can't divide interfaces from concrete classes. You can do two things:

  1. commit interfaces on your develop branch and after open a feature branch to commit concrete classes
  2. create interfaces and classes in two differents feature branches but in the concrete classes you have to comment the implementation command ex:

    class Concrete /* implements myInterface */ {
    

In the second case you have two corrects feature branches and after merge you have to delete comments tag by concrete class.

Related