Wednesday, April 1, 2020

Git pull from master into the development branch

Suppose you are working in branch-name : "branch-1". And you team is working on Branch name : "branch-2".

Now you want to take latest code from branch-name : "branch-2" to your working branch (whrer you are currently working).

git command to switch branch:
git checkout <branch-name>
git checkout branch-1    ------------> Now you are in your working branch

git command to pull remote repository code:
git pull origin master

Where
"branch-1" is “working-branch” in which branch you are currently working

   git pull git pull https://github.com/javaiq/git-commands-test branch-2  

Where :-
Origin -> https://github.com/javaiq/git-commands-test   // this is the api url

master -> “branch-name” from where we want to pull code into “working branch”
  Note:-  Here master is "branch-2" 

In this case pull command will do fetch + merge code from remote branch.
fetch the code from remote "branch-2" and merge the code with "branch-1"




Related Tutorial

1 comment:

  1. If you see this happening, bring it to the gambler’s consideration and stand by them after they reach out for help at treatment facilities or clinics. 바카라사이트 A problem gambler cannot stop playing conduct regardless of the popularity of ever-increasing, severe adverse consequences. The casinos in Nevada and New Jersey are the most obvious spots, however hardly the only places to gamble. Native American casinos function in 28 states with annual income of practically $30 billion.

    ReplyDelete