Where to find changes due to `git fetch`

前端 未结 3 1997
無奈伤痛
無奈伤痛 2020-12-12 16:50

I didn\'t want to lose some information after a git pull, so I did a git fetch before. Where can I read the new modifications after a git fet

3条回答
  •  遥遥无期
    2020-12-12 17:30

    Try

    git log --oneline --decorate origin/master
    

    This will give you the change log from the master head of the origin remote (you can substitute any other remote branch as needed). You'll get an output somewhat like this:

    234121 (origin/master) Commit message 5
    872373 Commit message 4
    623748 Commit message 3
    235090 (master) Commit message 2
    192399 Commit message 1
    

    The commit marked (master) is the head of your local master branch. The commit marked (origin/master) is the head of the remote's master branch.

提交回复
热议问题