Check changes before pulling from remote git repository steps below:
- fetch the changes from the remote
1git fetch origin - show commit logs of changes
1git log master..origin/master - show diffs of changes
1git diff master..origin/master - apply the changes by merge..
1git merge origin/master
Difference between Git Pull vs Git Fetch:
Git pull will download and merge latest changes from the remote repository automatically. You don’t have chance to review the changes and conflicts.
Git fetch will only download lastest changes but won’t merge. You can use git diff to review the changes and conflicts, then use git merge to merge the changes.