Using git submodules within atom


#1

I’d like to able to use submodules efficiently within Atom.

Use case file tree:

  • superproject
    • submodule1
      • file-a
    • submodule2
    • file-b
    • folder1

Expected behavior:

I’d like to able to select submodule1 (which, after all, includes a .git) or any folder or file therein (such as file-a) and be able to then have any add, commit and push etc. commands I do (with, say, git-plus) to apply to the submodule.

** Observed behavior:**

No matter where I am, any git operations will work only on the superproject.

In fact, if I just open the submodule1, edit, add and commit I get this:

Window load time: 1625ms /Applications/Atom.app/Contents/Resources/app/src/window-bootstrap.js:18
4
Uncaught Error: EEXIST, file already exists '/Users/Max/Github/barjoke/latexstyles/.git' /Users/Max/.atom/packages/git-plus/node_modules/fs-plus/node_modules/mkdirp/index.js:76

Any thoughts on how to handle this problem and submodules in general?


#2

This sounds like a problem with the git-plus package. To my understanding, Atom itself supports submodules properly … meaning the git-diff package, which is an official Atom package.

@akonwi, do you have any plans to support submodules?


#3

thanks @leedohm for the pointer. I’ve raised an issue about it over at the git-plus package.