I have next repository state:
I have started working on feature 1
(feature
branch), next I have switched to another_feature
, addition
and addition2
which were merged to master
.
Now I returned to feature
and I understand that my feature
can not work without addition
. What do I need to do in this case?
I cannot use merge
because in this case I will have another_feature
in the feature
:
git checkout feature
git merge addition
I can use and it work fine:
git checkout feature
git cherry-pick 9040
But it is very inconvenient if I have too many commits in addition
branch.
How can I cherry-pick
all commits from one branch and only from this branch?
And in this case I will have 9040
-commit two times in my master
after merge feature
. May be there is a better way to have changes from addition
branch in the feature
branch?
Addition: after commit feature 1
I have created Pull Request and we start to discuss it. It is very undesirable to close that PR and open the new one.