Viewing unpushed Git commits

前端 未结 25 3003
Happy的楠姐
Happy的楠姐 2020-11-22 08:05

How can I view any local commits I\'ve made, that haven\'t yet been pushed to the remote repository? Occasionally, git status will print out that my branch is X

25条回答
  •  生来不讨喜
    2020-11-22 08:57

    You can do this with git log:

    git log origin..
    

    Assuming that origin is the name of your upstream, leaving off any revision name after .. implies HEAD, which lists the new commits that haven't been pushed.

提交回复
热议问题