What is the practical difference between a git merge and a git pull?

4

In the day-to-day development I always use git pull to pick up changes from the main branch, where parallel developments are merged. However, some IDEs such as Netbeans implement the "git merge -ff origin develop" command, for example the git toolbar .

I could be doing git merge , would have the same effect, merge the changes of the other developers to my deployment branch, I would have the same effect, since:

  

To update your local repository with the newest version, run    git pull in your workbook to get and merge (merge)   remote changes. to merge another branch into your branch   active (eg master), use git merge <branch> , in both cases git   tries to merge changes automatically.

Source: link

But in practice, what would be the difference between git pull and git merge , in the situation of updating my local work with changes from another branch?

In either case a merge will be made at the end, or it will generate a conflict resolution to hit. But I wonder if using git pull instead of git merge is in fact the correct one and what implications this can cause.

So would it be possible to show cases that differentiate between the exclusive use of both?

    
asked by anonymous 25.08.2017 / 15:39

1 answer

6

git pull is the same as git fetch + git merge

Example:

git pull origin master

is the same as:

git fetch origin
git merge origin/master

Documentation in link

    
25.08.2017 / 16:28