运行命令后,Git 会进入子模块的目录,并执行 `git submodule update` 命令。 ## 4. 切换子模块分支 子模块在主项目中可以有不同的分支,可以使用 `git submodule foreach` 命令来切换子模块的分支。 “`shell git submodule foreach git checkout “` 其中,`branch` 是要切换到的分支名称。 例如,要切换子模...
add [-b <branch>] [-f|--force] [--name <name>] [--reference <repository>] [--ref-format <format>] [--depth <depth>] [--] <repository> [<path>] Add the given repository as a submodule at the given path to the changeset to be committed next to the current project: the curr...
如果子模块的文件列表显示为“modified”,则表示分支已经成功切换。 5. 运行`git add`命令将修改的子模块添加到父仓库的暂存区。 6. 运行`git commit -m “Update submodule branch”`命令来提交父仓库的变更。 7. 运行`git push`命令来推送父仓库的提交到远程仓库。 现在,子模块的分支已经更新成功了。其他开发...
.gitlab-ci.yml Merge branch 'jt/gitlab-ci-base-fix' Feb 11, 2025 .gitmodules sha1dc: optionally use sha1collisiondetection as a submodule Jul 4, 2017 .mailmap .mailmap document current address. Sep 7, 2024 .tsan-suppressions replace-object: make replace operations thread-safe Jan 18, 20...
5. git submodule update --recursive 更新仓库内容 提交代码流程 git status//查看修改的文件 git add 文件名 文件名//多个文件使用空格隔开即可 git commit//会弹出vim编辑器模板信息,按i即可进入编辑状态 ,项目名字、自定义名字。注释信息等,最后下bugID版本里面需要进入jira里面提交版本号,然后Esc退出,最后:wq...
git-submodule[1] Initialize, update or inspect submodules git-switch[1] Switch branches git-tag[1] Create, list, delete or verify a tag object signed with GPG git-worktree[1] Manage multiple working trees gitk[1] The Git repository browser ...
path: The local path that the Git submodule will be added to. commit: Specific commit to be checked out. Precisely one of branch, tag, or commit must be specified. During the resolution of thegit_submoduledependency, a Git submodule will be added to the git repository in the user's curr...
创建一个包含submodule的repo # 这里主要是使用 git submodule add 命令,该命令的签名为 git submodule add [-b <branch>] [-f] [-q] [--name <name>] <url> <path> -- -b : 拉取sub repo 的哪个分值, 可选,默认为 master -- -f : 强制覆盖submodule -- -q : 静默模式,不显示进度信息 --...
git branch -vv 分支重命名 git branch -m<oldname><newname> 检查某个提交是否包含本地的某个分支中。 git branch--contains<commit-id> git checkout 切换到指定分支。-b 要求先创建它。 git checkout [-b] <branchname> git commit 将stage区的修改提交。
通过使用相对于主存储库的 URL 添加。 例如,将签出子模块:git submodule add /../../submodule.git mymodule;不会签出子模块:git submodule add https://dev.azure.com/fabrikamfiber/_git/ConsoleApp mymodule 经过身份验证的子模块 备注 确保已使用 HTTPS(而不是 SSH)注册了子模块。