如何获取子模块参考指针的日志? [英] How do I get a log for submodule ref pointer?

查看:102
本文介绍了如何获取子模块参考指针的日志?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的子模块ref指针被移回了几个修订版本,我想知道是谁将这个更改提交给我们的主repo,我该怎么做?我如何才能获取仅用于子模块参考的日志?因为通过每次提交搜索更改的子模块引用不是一个选项。

解决方案

您可以简单地检查日志中的gitlink表示您的子模块在您的父级回购:

  git log  -  yourSubmodule 

这里没有结尾'/': yoursubmodule 是子模块签出的文件夹的名称。

但它也是 gitlink(特殊条目模式160000

这将只列出您的子模块gitlink已更改的提交。


My submodule ref pointer was moved back a few revisions and I would like to know who commited that change to our main repo, how can I do that? How can I get a log just for submodule reference? Because going through every commit searching for changed submodule reference is not an option.

解决方案

You can simply check the log for the gitlink representing your submodule in your parent repo:

git log -- yourSubmodule

No trailing '/' here: yoursubmodule is the name of the folder in which your submodule is checked out.
But it is also the name of the
gitlink (special entry mode 160000) recording that submodule in the parent repo.

That will list only the commits in which yoursubmodule gitlink has changed.

这篇关于如何获取子模块参考指针的日志?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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