how to pull and merge in git code example

Example 1: difference between git pull and git merge

// If you want to bring your local repository up to speed with a 
// remote repository use below command. It is the same as 
// (git fetch + git merge)
git pull

// The below command is going to import commits from a remote repo 
// without merging them, which gives you the opportunity to review 
// them before integrating.
git fetch

Example 2: how a to pull a branch in git

$ git pull origin other-branch

Example 3: pull from a brrrnch in git

$ git fetch origin other-branch