Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
390 views
in Technique[技术] by (71.8m points)

git - 查看未经删除的Git提交(Viewing unpushed Git commits)

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 commits ahead of origin/master , but not always.

(偶尔, git status会打印出我的分支是X提交在origin/master ,但并非总是如此。)

Is this a bug with my install of Git, or am I missing something?

(这是我安装Git的错误,还是我错过了什么?)

  ask by Josh Buhler translate from so

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)
git log origin/master..HEAD

您还可以使用相同的语法查看diff

git diff origin/master..HEAD

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...