- #1
- 2,138
- 2,713
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
dev
intomaster
, clear conflicts (if any), and complete the merge. Ifmaster
has diverged afterdev
was created, I can rebasemaster
intodev
, and then do the merge. Once the merge is complete, I can pushmaster
toorigin
. - Rebase (if necessary) and push
dev
to origin. Then create a pull request on Github, manage conflicts, and merge the pull request.