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
Post a Comment