The file will have its original line endings in your working directory. Please see Stack Overflow :: Git submodule add error. Seems the problem is the git command issued when Add is clicked. -b option should be
# Not currently on any branch. nothing to commit (working directory clean) 为什么是Not currently on any branch呢?不是应该默认在master分支吗?别急,一一解答! Git对于Submodule有特殊的处理方式,在一个主项目中引入了Submodule其实Git做了3件事情: 记录引用的仓库 记录主项目中Submodules的目录位置 记录引用Su...
The git working copy config can contain the reference to the remote url or the declaration of the current working copy as a submodule: https://git-scm.com/docs/git-submodule#Documentation/git-submodule.txt-init--ltpathgt82308203 Optional <path> arguments limit which submodules will be initializ...
git status On branch master Your branch is up todatewith'origin/master'. Changes not stagedforcommit: (use"git add <file>..."to update what will be committed) (use"git checkout -- <file>..."to discard changesinworking directory) modified: lib (new commits) no changes added to commit...
-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/bench...
nothing tocommit(working directoryclean) 为什么是Not currently on any branch呢?不是应该默认在master分支吗?别急,一一解答! Git对于Submodule有特殊的处理方式,在一个主项目中引入了Submodule其实Git做了3件事情: 记录引用的仓库 记录主项目中Submodules的目录位置 ...
提交submodule 我们在project-main下,git status发现,多出来的是.gitmodules和文件夹project-sub-1,我们将它们视为普通的文件,提交并推送到远程。 anders@ubuntu:~/repo/project-main$ git status On branch master No commits yet Changes to be committed: (use "git rm --cached <file>..." to unstage) ...
$ git status On branch master Your branch is up to date with 'origin/master'. Changes not staged for commit: (use "git add <file>..." to update what will be committed) (use "git restore <file>..." to discard changes in working directory) modified: ModuleB (new commits) no change...
记录引用Submodule的commit id 在project1中push之后其实就是更新了引用的commit id,然后project1-b在clone的时候获取到了submodule的commit id,然后当执行git submodule update的时候git就根据gitlink获取submodule的commit id,最后获取submodule的文件,所以clone之后不在任何分支上;但是master分支的commit id和HEAD保持一致...
henryyan@hy-hp ~/submd/ws/project1 git:(master) git submodule update henryyan@hy-hp ~/submd/ws/project1 git:(master) git status# On branch master# Changes not staged for commit:# (use "git add <file>..." to update what will be committed)# (use "git checkout -- <file>......