I created (git flow feature start branch1
) and published (git flow feature publish branch1
) a git flow feature branch based on develop
. After them, I have this marked as a Pull Request
, that another developer look at the changes in this branch. But now I want to work further, so I create a new feature branch (git flow feature start branch2
) based on branch1
where is waiting for Pull Request
. But after creating branch2
, there are only the files, where in branch1
are ignored (all files, where matched with the condition in .gitignore
).
When I checked out branch1
, I see the whole dictionary with all files, but why are in the new created feature branch (branch2
) not all files? So I can't work further.
I found the problem, but not the solution:
In .git/config
file, there is written, that the base from my branch2
the develop
branch is, and not branch1
:
[gitflow "branch.feature/branch1"]
base = develop
[branch "feature/branch1"]
remote = origin
merge = refs/heads/feature/branch1
[gitflow "branch.feature/branch2"]
base = develop
With following command I can move all files from branch1
in branch2
, but the base in the .git/config
-file changed not to branch1
...:
git rebase --onto feature/branch1 develop feature/branch2
Building with this template: git rebase --onto newBase oldBase feature/branch
How can I change the base-branch from my branch2
? Simply by changing base-branch from branch2
to branch1
in .git/config
?