We have a dev branch and a release branch. Dev branch is where all the developers check-in the code. All builds are taken from the release branch. We're using Stash (Atlassian's Enteprise Git) and wanted to incorporate code reviews using pull requests.
When someone submits a pull request, it is automatically including all the changesets from the dev branch that are not already merged into the release branch, even if they're not from the user who is submitting the request. How can the developer submit a request only for their changes and not everyone else's? Is this how it's supposed to be?
I see two workarounds -
What is the best practice?
A pull will pull all the commits, including their dependencies - it won't cherry-pick individual commits. So if you want to request that only your commits be pulled, and there are other people's commits in the same branch, you have to first separate your commits into a different branch. Yes, it will.
Have one commit per logical change and one major feature per pull request. When you submit a pull request, all the commits associated with that pull request should be related to the same major feature.
You can commit changes on a pull request branch that was created from a fork of your repository with permission from the pull request creator. You can only make commits on pull request branches that: are opened in a repository that you have push access to and that were created from a fork of that repository.
A pull request means a "request to pull". A pull will pull all the commits, including their dependencies - it won't cherry-pick individual commits.
So if you want to request that only your commits be pulled, and there are other people's commits in the same branch, you have to first separate your commits into a different branch.
What I currently use is this:
We have 3 branches:
The process is as follows:
Notice that in this process the Develop Branch is never merged into Release. After all, it will contain a bunch of code from other developers that isn't ready to be deployed. But my branch will contain only my code.
Just be aware of code that may impact your tests, as it may not go into the release branch at the same time. I would actually like some feedback on this architecture as well.
As an illustration, it's something like this:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With