开发者

Git: How to get remote updates without checkout?

I'm looking for a way to list all updated files in the remote master branch, similar to svn log.

Is that possible in Git?

Thanks,

Christoffer

开发者_StackOverflow

EDIT (Solution):

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


Without a checkout, you can do the git fetch and then git diff <theotherbranch>. Without a fetch I can't think of anything but web frontend.


Hmmm... perhaps

git fetch
git log origin/master

is what you want (it doesn't show list of changed files, but list of commits on remote-tracking branch).


A response to a comment: 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

Or read git diff's stdout directly.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜