开发者

Git: How to get remote updates without checkout?

开发者 https://www.devze.com 2022-12-14 03:16 出处:网络
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?

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

精彩评论

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