git submodule without its own folder

I want to make some parts of my projects, like my jQuery plugins external. I was looking into submodules for this purpose.
They seem quite perfect, because they can be managed and updated in one centralized point. My Only problem is, that they clone into a folder.
This leaves me with a structure like this.

/js
   /plugin_one
      plugin_one.js
   /plugin_two
      plugin_two.js

What I want is more like this.

  • Buildbot having issues with GitPoller
  • Is a git folder self-contained?
  • How can I undo a git merge, make changes, then redo the merge?
  • GIT GUI for solo project: Windows PC for development, but git + active, working project repo on a LAN headless linux server?
  • What does “fork” and “push upstream” mean for GitHub?
  • Autocreate directories when building
  • /js
       plugin_one.js
       plugin_two.js
    

    Is that achievable with submodules or am I using the wrong tool?

    Cheers.

  • Removes all modifications made to a file in GIT
  • Trouble pushing to Github, cannot spawn sh: No such file or directory
  • Random 'concerns' folders and '.keep' files
  • git - handling many similar-yet-slightly-different applications?
  • Push to GitHub fork takes no effect, says all commits up to date, but made some changes
  • Git push fail to a Windows share
  • One Solution collect form web for “git submodule without its own folder”

    Submodules are great for linking together several repo into a fixed set of configuration (ie a collection of SHA1 representing a fixed set of each of those submodules, as recorded by their parent repo)

    However, they are always cloned in their own directory.
    And they have a lot of other gocha’s too (see “Why your company shouldn’t use Git submodules”).

    One way to go around that is to maintain 2 different sets of working tree:

    One not versioned, with all the files together.
    One with the repos cloned normally (ie with the submodules in their own directory).

    You could do in it all the normal operation but with:

    • --git-tree option for each git commands, --git-tree pointing to the first set (the one with all the file in it)
    • a complete enough .gitignore able to ignore any file which isn’t part of their particular repo.

    That is not very satisfactory, and point out that submodules (even in other VCS which offer them — Hg and subrepos, ClearCase and UCM component, …) are supposed to be kept separate.

    So sharing a JQuery plugin might first involve a bit of re-thinking the file organization to see if those files can indeed be considered as a “submodule”.

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