3

This question is a follow up of this one: Magento 1: improving my module development workflow (Modman, composer, git)

Reminder:

I am using a bunch of extensions that me and the team I'm working with have developped (here we're talking 50+ extensions) and the code for those extensions is stored on Bitbucket

I've changed my development workflow to the following:

At the moment, when I want to add a feature/fix a bug for one of those extensions, here's my workflow:

  • Install the last version of the extension on one of the website via Modman with symlinks
  • Fix the bug/add a feature/test by modifying the files in .modman module folder
  • Go the .modman module folder and commit/push my module changes (thus the bitbucket repo for this extension will be updated)
  • Go back to my root folder and commit and push via GIT to the website repo

My problem now is that Assembla does not seem to recognize the symlinks from that last commit/push step.

It gives me a weird icon (like it doesn't know if it's a file or a folder):

enter image description here

If I check the commit here's what I see:

enter image description here

I'm not exactly sure what I'm missing here but when my team mates pull the repo on their side, their .modman folder ends up being empty.

NB: something I noticed when I pushed my changes to the website repo is that I tend to get a GIT error: "fatal: git cat-file: couldn not get object info" but the commit is still pushed. I'm not sure if it's related though

5

It gives me a weird icon (like it doesn't know if it's a file or a folder):

It's a broken git submodule. This happens if you accidently commit a directory that contains a .git directory.

To prevent that, use the following in your last step

git add .modman/Vendor_Module/*

The /* adds all files in the directory, excluding those starting with a dot

Note that if you have files starting with a dot in the module's root directory (like .gitignore) you will have to add them manually.

How to fix the broken submodules

First remove the submodule from the repository (--cached makes sure to not change your workspace)

git rm --cached .modman/Vendor_Module

Then re-add the files as described above.

  • When I do that I get fatal: Path '.modman/Vendor_Module/app' is in submodule '.modman/Vendor_Module' – Raphael at Digital Pianism May 5 '17 at 12:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.