Git commit to common submodule (master branch)

Short answer: cd ProjectFooBarCommoneSubmodule git checkout master <Do your editing> git commit –all -m “Lots of fixes” git push submodule_origin master cd .. git add ProjectFooBarCommoneSubmodule git commit -m “Bumped up the revision of ProjectFooBarCommoneSubmodule” git push origin master The longer one: Git submodules are a dependency mechanism, where the main project (say A) defines … Read more

How do I add files in Git to the path of a former submodule?

Git still think mysubmodule is a submodule, because it is recorded in the index with a special mode “160000”. See “git submodule update needed only initially?” for more. To check that, as in in this answer, you can do a: $ git ls-tree HEAD mysubmodule 160000 commit c0f065504bb0e8cfa2b107e975bb9dc5a34b0398 mysubmodule That doesn’t depend on the presence … Read more

Force Git submodules to always stay current

As I mention in “git submodule tracking latest”, you can since git 1.8.2 (March 2013) make a submodule track the HEAD of branch: git submodule add -b <branch> <repository> [<path>] A submodule SHA1 is still recorded in the parent repo as a gitlink (special entry in the index) But a git submodule update –remote will … Read more

Git Submodules. Pulling into a new clone of the super-project

It seems that now (in 2019) installing latest GIT client could solve the problem according to comments below. This should be the best solution for now. I have the same problem as you. This is a bug in git: http://git.661346.n2.nabble.com/BUG-git-submodule-update-is-not-fail-safe-td7574168.html In short, for your problem, try: # rm -rf external_libraries/BEACHhtml # git submodule update It … Read more

Why is git submodule not updated automatically on git checkout?

git checkout –recurse-submodules was added to git 2.13 This is mentioned on the release notes at: https://github.com/git/git/commit/e1104a5ee539408b81566066aaa6963cb87d5cd6#diff-c24776ff22455a30fbb78e378b7df0b0R139 submodule.recurse option was added to git 2.14 Set as: git config –global submodule.recurse true man git-config says: Specifies if commands recurse into submodules by default. This applies to all commands that have a –recurse-submodules option. Defaults to false. … Read more

Git submodules not updating in Jenkins build

Note that the Jenkins Git plugin 2.0 will have “advance submodule behaviors”, which should ensure proper updates of the submodules: As commented by vikramvi: Advanced sub-modules behavior > “Path of the reference repo to use during submodule update” against this field , add submodule git url. Owen B mentions in the comments: For the authentication … Read more