$ cd ./packages/react-dom $ git branch * (HEAD detached at ac4d1fc) master 设计如此,没有太好的解决办法: It’s also important to realize that a submodule reference within the host repository is not a reference to a speci
-name ".gitmodules") (py38) ➜ onnxruntime git:(main) ✗ cat ./cmake/external/onnx/.gitmodules [submodule "third_party/pybind11"] path = third_party/pybind11 url = git@github.com:pybind/pybind11.git branch = master [submodule "third_party/benchmark"] path = third_party/benchm...
and nothing else. Doing this saves a lot of space on the hard drive and reduces the download size. Since some repositories can be very large, this method reduces bandwidth usage if you need to work on a specific branch only.
Executinggit statusshows us that the parent repository is aware of the new commits to theawesomelibrarysubmodule. It doesn't go into detail about the specific updates because that is the submodule repositories responsibility. The parent repository is only concerned with pinning the submodule to a co...
which is annoying – as we thought we had told git to track the branch and the submodule is now updated to the latest branch commit… what’s going on? This happens to be a limitation of submodule branch tracking –git submodule add -bsimply adds information about a branch in the .git...
[--] <path>…)git submodule[--quiet] update [<options>] [--] [<path>…]git submodule[--quiet] set-branch [<options>] [--] <path>git submodule[--quiet] set-url [--] <path> <newurl>git submodule[--quiet] summary [<options>] [--] [<path>…]git submodule[--...
--recurse-submodules THIS OPTION IS EXPERIMENTAL! Causes the current command to recurse into submodules ifsubmodule.propagateBranchesis enabled. Seesubmodule.propagateBranchesingit-config[1]. Currently, only branch creation is supported. When used in branch creation, a new branch <branchname> will ...
git ${wt_prefix:+-C "$wt_prefix"} submodule--helper add ${quiet:+--quiet} ${force:+--force} ${progress:+"--progress"} ${branch:+--branch "$branch"} ${reference_path:+--reference "$reference_path"} ${dissociate:+--dissociate} ${custom_name:+--name "$custom_name"} ${depth...
However, you can also choose to check out a specific commit (one that is not the tip of a branch). This is a rather rare case in Git and should normally be avoided. However, when working with Submodules, it is the normal state to have a certain commit (and not a branch) checked ...
git submoduleupdate One major difference between "submodule update" and "submodule add" is that "update" checks out a specific commit, rather than the tip of a branch. It's like checking out a tag: the head is detached, so you're not working on a branch. ...