簡體   English   中英

Git:如何在沒有結賬的情況下獲得遠程更新?

[英]Git: How to get remote updates without checkout?

我正在尋找一種方法來列出遠程主分支中的所有更新文件,類似於svn log

這可能在Git?

謝謝,
克里斯托弗

編輯 (解決方案):

git fetch
git diff --name-status origin/master

沒有結賬,你可以進行git fetch ,然后git diff <theotherbranch> 沒有抓取我除了網絡前端之外我什么都想不到。

嗯...也許吧

git fetch
git log origin/master

是你想要的(它不顯示已更改文件的列表,但遠程跟蹤分支上的提交列表)。

對評論的回復: If I would write a script (similar to a web frontend) to perform the operation, how would it work?

git fetch
git diff <branchname> > otherbranch.diff

或直接閱讀git diff的stdout

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM