提交远程存储库的历史记录 [英] Commit history on remote repository

查看:102
本文介绍了提交远程存储库的历史记录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图在远程存储库上访问分支的提交历史记录。我查看了文档,但可以没有找到任何关于如何使用我的本地git客户端访问远程仓库提交历史的实质性信息。

I am trying to access a branch's commit history on a remote repository. I had a look at the doc but could not find any substantial information on how to access a remote repo's commit history using my local git client.

推荐答案

git log remotename/branchname

将在该存储库中显示给定远程分支的日志,但只显示您从存储库获取到您的个人复制 。

Will display the log of a given remote branch in that repository, but only the logs that you have "fetched" from their repository to your personal "copy" of the remote repository.

请记住,只有通过执行 git fetch ,您的存储库克隆版才会更新其所有远程分支的状态。 $ C>。你不能直接连接到服务器来检查那里的日志,你要做的是用 git fetch 下载服务器的状态,然后在本地查看远程日志分支。

Remember that your clone of the repository will update its state of any remote branches only by doing git fetch. You can't connect directly to the server to check the log there, what you do is download the state of the server with git fetch and then locally see the log of the remote branches.

也许另一个有用的命令是:

Perhaps another useful command could be:

git log HEAD..remote/branch

它将显示远程分支中的提交,但不会在您当前的分行( HEAD )。

which will show you the commits that are in the remote branch, but not in your current branch (HEAD).

这篇关于提交远程存储库的历史记录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆