Home > Enterprise >  How to make a Pull Request to preproduction branch from feature branch without incorporating the mas
How to make a Pull Request to preproduction branch from feature branch without incorporating the mas

Time:09-21

I have created a branch for a new feature from master called 'feature/test', to test on a test server I must make a Pull Request and incorporate the changes I have made to the /develop branch.

The problem I have is that when I try to do the PR not only the commits of my changes are included but also the commit that is produced when doing the merge from master, which also includes many other changes that should not be present.

How can I exclude that commit and only include in the Pull Requests the changes I have made?

CodePudding user response:

You can make a fresh branch out of develop

then you can do git cherry-pick <commit hash> or <commit hashes space seprated>

resolve conflicts if any

commit the changes and run

git cherry-pick —continue

when you're done push it and open a PR

CodePudding user response:

Rebase the branch... something like

git rebase --onto develop master feature/test

That will set feature/test on top of develop only moving commits that are not part of master.

  • Related