简体   繁体   English

无法查看git日志,Gerrit的历史记录

[英]Cannot see git log, history on the Gerrit

I install gerrit on my linux comupter. 我在Linux电脑上安装gerrit。 All of the git commands operate very well. 所有的git命令都能很好地运行。 However, after pushing the commit, there is no logs on the gerrit. 但是,在推送提交之后,gerrit上没有日志。 I can see the log with "git log on the shell", however, I could not see the logs on the web page. 我可以看到带有“ shell上的git log”的日志,但是,我看不到网页上的日志。

I use the PostgreSql and ~/gerrit/git/ folder looks normal. 我使用PostgreSql,〜/ gerrit / git /文件夹看起来很正常。

What should I do to see the code history on the web? 我应该怎么做才能在网络上查看代码历史记录?

The only commits you'll ever see in the Gerrit web interface are commits that have been (or are about to be) reviewed, ie commits at some point pushed to refs/for/some-branch-name. 您将在Gerrit Web界面中看到的唯一提交是已(或将要)审核的提交,即,在某些时候将提交推送到refs / for / some-branch-name的提交。 Commits pushed to refs/heads/some-branch-name (either via Gerrit or straight into the file system) will not be visible in Gerrit. 推送到refs / heads / some-branch-name(通过Gerrit或直接进入文件系统)的提交在Gerrit中不可见。 You'll have to use a repository viewer like cgit or Gitiles for that. 为此,您必须使用诸如cgitGitiles之类的资源库查看器。

I think you are directly pushing to git using command " git push origin master (or some branch) ". 我认为您正在使用命令“ git push origin master(或某些分支) ”直接推送到git。 In this case, changes will go directly to git repo, and will update your git log. 在这种情况下,更改将直接转到git repo,并将更新您的git日志。 But if you want that particular change to go through proper review system or through gerrit, you need to push it to refs using the below command: " git push origin HEAD:refs/for/branch name " 但是,如果您希望特定更改通过适当的审核系统或Gerrit,则需要使用以下命令将其推送到引用:“ git push origin HEAD:refs / for / branch name

By using above command, it will go to gerrit and you will be able to see the change in gerrit UI also. 通过使用上面的命令,它将转到gerrit,您也可以在gerrit UI中看到更改。 And one more thing, since you have pushed it from your local repo, it will also present in your git log of that local repo , so don't get confused ;). 还有一件事,因为您已将其从本地存储库中推送出去,它也将出现在该本地存储库的git日志中,因此请不要感到困惑;)。 Check in some other repo, you will get the difference. 签入其他回购,您将有所不同。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM