git - How to bring team's changes into my branch as neatly as possible? -


i've been puzzling on , can't figure out answer. let's team working on origin/develop (which i'm tracking locally) , i'm working on local branch feat-search. i'm several commits in, , want bring in changes develop branch. options are:

  1. git pull origin develop
  2. git pull --rebase origin develop
  3. git checkout develop; git pull origin develop; git checkout feat-search; git rebase develop
  4. git checkout develop; git pull origin develop; git checkout feat-search; git merge develop
  5. none of above; keep working on branch , don't bring in changes develop

the thing is, think if use git pull --rebase, git graph collapsed when merge branch in , looks visually never branched off. people may not that. if use git pull, merges develop branch looks strange on graph well.

i'm confused hell. appreciated.

git pull --rebase, git graph collapsed when merge branch in , looks visually never branched off.

that not bug, feature, keep history linear.
doesn't remove branch: still branching off origin/develop. make sure merge develop trivial 1 (because working latest commits of origin/develop).

one advocate make sure git pull rebase:

git config --global --bool pull.rebase true 

if have many local feature branches rebase, can automate process with git-rebranch.


Comments

Popular posts from this blog

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

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

url rewriting - How to redirect a http POST with urlrewritefilter -