Working with Git submodules without .gitmodules

I’m interested in the specific case where you manually place one Git repository inside another Git repository (either by using git clone or by copy-pasting in the filesystem). I’ve noticed the following things happen when you do this:

  1. Git will save a pointer to a specific commit, like with a submodule.
  2. Git will not allow you to modify the contents of the subproject from within the
    superproject, like with a submodule.
  3. git clone on the superproject will not copy the subproject contents,
    like with a submodule.
  4. git submodule will not work. It complains about .gitmodules not being

I would like to know:

  • Maintaining a Lite and Pro Version of Python Project with Git/PyCharm
  • Getting commitid or 'git describe' with git-cvsserver and a CVS working copy
  • git receive-pack stops with 0000
  • “git push all” (multiple repositories) doesn't work
  • Browse disk usage of git staging area
  • git add only some changed files
    • What does .gitmodules do? It’s absence is the only obvious difference between a
      manual copy like this and a true submodule.
    • Is there any other difference I don’t know about?
    • Does this manually-copied state have a special name?
    • Is there any way to override and/or work around effects 3 and 4? (IE: I want to
      render the resulting repository fully usable)

  • What does UserA committed with UserB 13 days ago on github mean?
  • Does git duplicate all my files?
  • Github not showing activity under my profile whenever I commit/push
  • Where to find changes due to `git fetch`
  • How to make git work with vimdiff and trustExitCode
  • Why git is called a distributed source control system?
  • One Solution collect form web for “Working with Git submodules without .gitmodules”

    I think the only difference is a submodule has a relation with its parent. For instance, you can use --recursive option when cloning to fetch all the submodules at a time. Otherwise, you’d have to fetch them all one by one.

    Git Baby is a git and github fan, let's start git clone.