When you add a Git submodule path to your repository, Git creates a special entry in your repository'sconfig file that points to the submodule's URL and the location where it should be cloned. When you clone the main repository, Git will automatically clone the submodules as well, and ini...
Let’s start by adding an existing Git repository as a submodule of the repository that we’re working on. To add a new submodule you use thegit submodule addcommand with the absolute or relative URL of the pro
git submodule[--quiet]add[<options>][--]<repository>[<path>]git submodule[--quiet]status[--cached][--recursive][--][<path>…]git submodule[--quiet]init[--][<path>…]git submodule[--quiet]deinit[-f|--force](--all|[--]<path>…)git submodule[--quiet]update[<options>...
$ git submodule add https://github.com/djyde/ToProgress Let's have a look at what just happened: (1) The command started a simple cloning process of the specified Git repository: Cloning into 'lib/ToProgress'... remote: Counting objects: 180, done. remote: Compressing objects: 100% ...
or: git submodule [--quiet]foreach[--recursive] <command>or: git submodule [--quiet] sync [--recursive] [--] [<path>...] or: git submodule [--quiet] absorbgitdirs [--] [<path>...]
git submodule [--quiet] update [<options>] [--] [<path>…] git submodule [--quiet] summary [<options>] [--] [<path>…] git submodule [--quiet] foreach [--recursive] <command> git submodule [--quiet] sync [--recursive] [--] [<path>…] git submodule [--quiet]...
or: git submodule [--quiet] summary [--cached|--files] [--summary-limit <n>] [commit] [--] [<path>...] or: git submodule [--quiet] foreach [--recursive] <command> or: git submodule [--quiet] sync [--recursive] [--] [<path>...] ...
$ git rm --cached <submodule-name> 3. 其他说明 3.1 使用 foreach 批量操作 若一个项目中有多个子模块需要执行相同的操作,每次切换到对应的目录挨个执行效率太低,此时可以使用git submodule foreach <command>: 代码语言:txt AI代码解释 $ git submodule foreach git checkout master ...
使用git submodule add <submodule_url> 命令可以在项目中创建一个submodule 。 从主项目文件夹中进入git $ git submodule add http://xxxx/sub-project.git Cloning into 'D:/project/main-project/sub-project'... remote: Counting objects: 60, done. ...
the submodule is not updated. This update procedure is not allowed on the command line. If the submodule is not yet initialized, and you just want to use the setting as stored in.gitmodules, you can automatically initialize the submodule with the--initoption. ...