I have an opensrc project on bitbucket- https://bitbucket.org/ijabz/jaudiotagger/src/master/README.md
I have some pull requests by contributors to review.
In the past I have just checked the code and then merged the code into the remote master branch on Bitbucket using the Merge button. But these pull requests are too complex for that I need to merge with my local master branch on my computer, build and test it, and then only if okay merge it into the remote master branch.
But I dont know how to do this ?
CodePudding user response:
The branch you want to merge isn't part of your repository yet; it's only in the contributors repository. You'll need to create a new remote first.
git remote add mvmn ... # You'll need the contributor's fork's URL
git remote update mvmn
git checkout -b pr69 --track mvmn/generics_refactoring
git merge master
After you are done testing, you can delete the generics_refactoring
branch (after checking out another branch, of course)
git branch -D pr69
CodePudding user response:
Whoever did the pull request has the changes in one branch feature
, for example. If you can do git fetch <your remote>
, then the branch feature
will be available for you. Now, you should run git checkout <your master branch>
, just in case you are not there, then run git merge feature
.
With that done you should be able to run your tests locally before merging the feature branch in your remote master