difference between git pull and git merge branch 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: difference between pull and pull request

If you use git pull, you pull the changes from the remote repository
into yours.

If you send a pull request to another repository, you ask their 
maintainers to pull your changes into theirs (you more or less ask
them to use a git pull from your repository).

Tags:

Misc Example