Pulling remote branches
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 local branch's changes, as shown below.

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

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

A merge commit is automatically created in the local repository when executing a pull. If there is a conflict, you will have to resolve the conflict and commit the merge manually.

If there is no conflict, the commit will merge automatically.