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

后端 未结 8 1847
伪装坚强ぢ
伪装坚强ぢ 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 05:16

    git status does not always show the difference between master and origin/master even after a fetch.

    If you want the combination git fetch origin && git status to work, you need to specify the tracking information between the local branch and origin:

    # git branch --set-upstream-to=origin/ 
    

    For the master branch:

    git branch --set-upstream-to=origin/master master
    

提交回复
热议问题