Git也从嵌套的git repos添加所有文件 [英] Git add all files also from nested git repos

查看:94
本文介绍了Git也从嵌套的git repos添加所有文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的dotfiles存储库有一些tmux插件目录,它们本身就是git存储库.当我执行git add-时,所有这些嵌套的存储库都将被忽略.

My dotfiles repository has some tmux plugin directories which are themselves git repositories. When I do git add -all these nested repos are ignored.

是否有一种方法可以忽略这些嵌套存储库的git语义,并将所有内容都视为常规文件?

Is there a way to ignore the git semantics of these nested repos and treat everything as regular files?

推荐答案

您可能正在寻找名为子模块的Git功能.这 功能可帮助您管理嵌套在其中的从属存储库 您的主要存储库.

You may be looking for the Git feature called submodules. This feature helps you manage dependent repositories that are nested inside your main repository.

此处

此外,您可能需要检查您可能拥有的.gitignore文件.这样可以防止添加嵌套存储库.

Also you might want to check the .gitignore files you might have. It can prevent the nested repositories from being added.

这篇关于Git也从嵌套的git repos添加所有文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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