S
S
Sergey Nikolaev2015-06-19 16:16:22
git
Sergey Nikolaev, 2015-06-19 16:16:22

How to update a git branch to master level?

Good afternoon.
Suppose there is a branch responsible for the output of goods and services.
The product branch is merged into the master, after which N commits are made to the services branch, where some kind of global configuration is written, the changes of which must be applied to the product branch.
How to replace a product branch completely with files from the master?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
E
Eugene Burmakin, 2015-06-19
@Devastor

If you are in the master, then git pull --rebase
If you are in the branch, thengit pull --rebase origin/master

I
ivankomolin, 2015-06-19
@ivankomolin

Execute git pull origin masterwhile in the product branch.

T
toxa82, 2015-06-19
@toxa82

While on the desired branch git rebase master
, this will remove the commits that differ from the master, update the branch to the state of the master, and revert the retracted commits.
Or assign master to your branch

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question