Viewing unpushed Git commits

前端 未结 25 2400
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:40

    If the number of commits that have not been pushed out is a single-digit number, which it often is, the easiest way is:

    $ git checkout
    

    git responds by telling you that you are "ahead N commits" relative your origin. So now just keep that number in mind when viewing logs. If you're "ahead by 3 commits", the top 3 commits in the history are still private.

提交回复
热议问题