S
S
Spunreal2016-04-13 13:55:26
git
Spunreal, 2016-04-13 13:55:26

What is the correct way to update a branch in Git to master?

At the insistence of "more experienced" developers in the project, updating the branch to the master is done as follows:
1) Switch to the master
2) Merjim the branch with the master without commit and fast forward 2) Pour the
changes into a new branch, for example, with a fastfix _2 I
found another option on the Internet :
we execute in the branch git pull origin master
Perhaps there is a more correct option.
How to correctly update the branch to the current version of the master, so that there are no pitfalls such as changing the pointer to the master, etc.?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
Ivan Filatov, 2016-04-13
@NYMEZIDE

1. pull from origin master to your master
2. merge from master to your branch.
3. fix conflicts if any.
and in general the wrong approach if you work without an intermediate develop
master should never have direct branches in feature_* branches.
read about git flow

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question