You can apply the latest changes from a remote repository to your local repository using the git pull command.
For example, say the remote branch is upstream of your local branch. The remote branch would include all of the changes that belong to the local branch as shown below.

In this case, if we were to apply a merge from the remote branch (origin/master) into our local branch (master), it would be a fast-forward merge.

However, if there are changes in the local master branch that are not present in the remote origin/master branch, the git pull command will execute a merge and create a merge commit that ties those changes together.

When a pull is executed, a merge commit will be automatically created in the local repository. If there is a conflict, you will have to resolve the conflict and commit the merge manually.
