How to check for changes on remote (origin) Git repository

后端 未结 8 1850
伪装坚强ぢ
伪装坚强ぢ 2020-12-04 04:12

What are the Git commands to do the following workflow?

Scenario

I cloned from a repository and did some commits of my own to my local reposit

8条回答
  •  长情又很酷
    2020-12-04 04:49

    You could git fetch origin to update the remote branch in your repository to point to the latest version. For a diff against the remote:

    git diff origin/master
    

    Yes, you can use caret notation as well.

    If you want to accept the remote changes:

    git merge origin/master
    

提交回复
热议问题