首页 \ 问答 \ 在git仓库中列出子模块(List submodules in a Git repository)

在git仓库中列出子模块(List submodules in a Git repository)

我有一个git仓库,其中有几个子模块。 在运行git submodule init之后,如何列出所有子模块的名称?

git submodule foreach命令可以回显子模块的名称,但只有在初始化步骤之后,它们已经被检出才会发生。 链中有更多的步骤需要在它们被检出之前进行,而且我不想将子模块的名称连接到脚本中。

那么有一个git命令来获取所有当前注册但尚未检出的子模块的名称?


I have a Git repository that has several submodules in it. How do I list the names of all the submodules after git submodule init has been run?

The git submodule foreach command could echo the names of the submodule, but that only works once they have been checked out which has not happened after the init step. There are more steps in the chain that need to happen before they can be checked out, and I don't want to have to hard-wire names of submodules into the script.

So is there a Git command to get the names of all currently registered, but not yet checked out submodules?


原文:https://stackoverflow.com/questions/12641469
更新时间:2023-10-05 14:10

最满意答案

vertical-align: top添加到textarea

差距的原因是textarea是一个inline (或inline-block )元素,而差距是为文本中的下降者保留的空格。 我不知道为什么不同浏览器之间的差距是不同的。


Add vertical-align: top to textarea.

The reason for the gap is that textarea is an inline (or inline-block) element, and the gap is the space reserved for descenders in text. I don't know exactly why the gap is different between different browsers.

相关问答

更多
  • 您的格式化插入了大量的空白区域。 改为尝试以下操作: You're inserting a lot of white-space with your formatting. Try the following instead: All I did was remove your white-space: nowrap; an ...
  • 尝试添加textarea {resize:none} css风格。 您还可以使用horizontal , vertical或both作为值。 Try adding textarea {resize:none} css style. You can also use horizontal, vertical or both as values.
  • 将vertical-align: top添加到textarea 。 差距的原因是textarea是一个inline (或inline-block )元素,而差距是为文本中的下降者保留的空格。 我不知道为什么不同浏览器之间的差距是不同的。 Add vertical-align: top to textarea. The reason for the gap is that textarea is an inline (or inline-block) element, and the gap is the s ...
  • 根据规范 ,HTML5文本区域使用LF字符表示新行( \n ),但它们也“理解”并在内部转换\r和\r\n 。 当textarea是可变的时,其原始值应该由用户编辑:用户代理应该允许用户编辑,插入和删除文本,以及以“LF”形式插入和删除换行符(U + 000A )人物。 (......) 由于历史原因,元素的值以三种不同的方式归一化,用于三种不同的目的。 原始值是最初设置的值。 它没有正常化。 API值是值IDL属性中使用的值。 它被规范化,以便换行使用“LF”(U + 000A)字符。 最后,还有表单提交 ...
  • td也需要height: 100% 。 我将它应用于所有这些,但您可能只想将其限制为具有textarea具体取决于您如何实现它。 此外,使textarea display: block因为这将删除底部的一点点空白。 你也可以使用vertical-align: top而不是display: block