- 2,180
- 2,721
At first, let us assume the following: I have a repo named
Now, I want to merge
MyRepo that is also on Github (origin). The repo has two branches: master and dev. Both the branches are synchronised with Github.Now, I want to merge
dev with master. For doing this, I have two options:- Locally merge
devintomaster, clear conflicts (if any), and complete the merge. Ifmasterhas diverged afterdevwas created, I can rebasemasterintodev, and then do the merge. Once the merge is complete, I can pushmastertoorigin. - Rebase (if necessary) and push
devto origin. Then create a pull request on Github, manage conflicts, and merge the pull request.