When you work in a team, it might happen that new commits are present in the repository but not in your local history, such as:
You need to pull
the remote modifications to your main branch
.As you have no local commit that is not present in the remote branch
pull
only updates the local branch.
Now, let's imagine that you have a local commit unpushed to the remote copy:
If you use pull
, git will automatically create an additional commit
that will merge both branchs together.
You then need to push
the new commit onto the remote branch to finish the synchronization.
The corresponding command is git pull
(see documentation).