git - when working on a branch (new feat), do I pull in updates or merge them? -


let's there's origin/develop branch. i've branched off feat-whatever locally (doesn't exist on server yet) , working on branch. if want update branch team has done, do (while on feat-whatever branch):

git pull origin develop 

or

git checkout develop git pull git checkout feat-whatever git merge develop 

they're both equivalent, since pull fetch followed merge. well, there 1 difference...the second method updates local develop branch, while first 1 won't.

you have option of rebasing feature branch synchronize upstream changes:

git fetch origin git checkout feat-whatever git rebase origin/develop 

Comments

Popular posts from this blog

html - How to style widget with post count different than without post count -

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

javascript - storing input from prompt in array and displaying the array -