![](/img/trans.png)
[英]how to see how many commit ahead or behind my local master is compare to my remote master in git
[英]How to compare local master with remote master in Git?
我在github.com上的遠程代碼中所做的更改很少。 現在,我需要將本地master分支與origin進行比較。 我正在使用下面的命令來獲取差異,但在終端上看不到差異。
git diff master origin/master
如果使用以下命令,則可以從原點獲取最新信息,並且可以看到所做的更改。
git pull origin master
在不使用git pull
情況下,如何查看master和origin / master中的差異?
嘗試運行以下命令:
git fetch
git diff remote/branch
git fetch
從遠程更新您的跟蹤分支。
git diff
將比較遠程分支和本地分支。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.