Why doesn’t `git checkout` automatically do `git submodule update –recursive`? [duplicate]

It sounds like what you want to do can be achieved from git v2.13 on with the new –recurse-submodules option of git checkout. From the git-checkout manual page: –[no-]recurse-submodules Using –recurse-submodules will update the content of all initialized submodules according to the commit recorded in the superproject. If local modifications in a submodule would be … Read more

Git repo inside repo [duplicate]

To have one git repo “inside” another, look at git submodules: http://git-scm.com/book/en/Git-Tools-Submodules By making pychargify a submodule of your django project, specific revisions of your django project can be associated with specific revisions of your pychargify project. That can be really useful. I’m not sure exactly what the dangers are of the approach you describe, … Read more

Is there a way to use a Mercurial repository as Git submodule?

Using git-hg. First, make sure there is a (non-Mercurial) git submodule under your main repository. If you don’t have other submodules yet, just create a dummy submodule for some library other than core-plot, for instance: main-repo $ git submodule add https://repo.url.com/repo.git repo Second, clone the core-plot library into some directory. main-repo $ git-hg clone https://code.google.com/p/core-plot/ … Read more

How to “resolve fatal: Not a git repository”?

These two files contains absolute submodule path: {submodule}/.git .git/modules/{submodule}/config So, if you moved the repo, the absolute path in these two files are not valid, and cause the ‘not a git repository’ error. Just fix these files manually. Update: 1.) Delete the relevant section from the .gitmodules file. You can use below command: git config … Read more

Unable to find current origin/master revision in submodule path

Running this in the main repository should do the trick: git pull –recurse-submodules According to the other discussion, especially as @Tobu pointed out in his comment over there, if the error persists, it might be needed to first: remove both the submodule worktree (ext/blah) and the matching folder inside the GIT_DIR (.git/modules/ext/blah) Alternatively, you could … Read more