M
M
matveyboyko2017-10-18 10:38:19
git
matveyboyko, 2017-10-18 10:38:19

How to merge a remote branch?

In a remote repository, another developer created a branch and uploaded changes there.
I need to upload these changes to the master branch on prod.
To do this, somehow you need to merge a new branch in master.
I understand how it works locally, but not remotely.
Who will help?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
L
Lynn "Coffee Man", 2017-10-18
@matveyboyko

Reduce the task to the previous one

git checkout master
git pull
git merge origin/other-branch
git push

X
xtala zen, 2017-10-18
@xtala

Need parameter -force
git checkout master
git pull
git merge origin/other-branch
git push -force origin master

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question