Suppose you are working on a new feature in a dedicated branch, and another team member updates the master branch with new commits. You can use these two functions:
To incorporate the new commits into your feature branch, use Git merge.
Creates an extra merge commit every time you need to incorporate changes
But, it pollutes your feature branch history
As an alternative to merging, you can rebase the feature branch on to master.
Incorporates all the new commits in the master branch
It creates new commits for every commit in the original branch and rewrites project history