Git - Does a remote branch need to be pulled local to merge? -


i have local branch on committed changes. pull changes have been added parent branch other developers. need pull down parent branch locally before doing merge?

i thought had been bringing down changes made other developers going dev branch , issuing merge command , selecting remote branch. however, don't think pulled down parent branch changes until issued pull parent branch.

technically there 3 different branches should think of:

  • your local branch (e.g. master) commit changes to
  • the branch on remote server, others push changes to
  • the remote branch (e.g. origin/master) in local repository use track remote repository

after other people push work remote repository, need git fetch update remote branch in order see changes.

afterwards can use changes merge e.g. origin/master master. , can push result server.

you can fetch , merge in 2 commands or use git pull pretty same first fetch merge. (also aware of --rebase option, combination of fetch , rebase, gives cleaner history.)


Comments

Popular posts from this blog

sublimetext3 - what keyboard shortcut is to comment/uncomment for this script tag in sublime -

java - No use of nillable="0" in SOAP Webservice -

ubuntu - Laravel 5.2 quickstart guide gives Not Found Error -