How to check changes before pulling from remote git repository

Check changes before pulling from remote git repository steps below:
  1. fetch the changes from the remote
  2. show commit logs of changes
  3. show diffs of changes
  4. apply the changes by merge..

     
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.

Bookmark/Favorites

Leave a Reply

Your email address will not be published. Required fields are marked *