I have a Git branch develop, and on that branch, there are a number of commits that are just debugging statements and shouldn't be in production. Meanwhile, I want to create a pull request from the develop branch onto our feature branch, but I don't want to include the debugging commits.
It seems like my two options for doing this are to (1) create a develop-copy branch, drop the appropriate commits from that branch, and make a PR from develop-copy or (2) drop the appropriate commits from develop, make the PR, then cherry-pick the commits back into develop. Both of these are kind of a pain.
Is there a way to just push a certain set of commits or to have two branches that are copies of each other except for these commits? Thanks.