Creating a per module git repo environment for magento module development on one site

I want to develop multiple Magento modules on one fresh install of Magento 1.7 so that each module can be pushed to an online repo and tracked individually.

I initially began by following this tutorial but can’t get Magento to detect the module using symlinks. I have enabled the ‘follow symlinks’ option in the backend. I could be struggling here due to file permissions or something but I don’t mind abandoning this approach for a .gitignore “whitelist”. Something like

  • Git hooks : applying `git config core.hooksPath`
  • How to retrieve changesets associated with a build in TFS 2013 with Git?
  • GIT pull/fetch from specific tag
  • git mergetool doesn't 3-way merge properly
  • Remove git submodule/repo inside repo fatal: Pathspec 'xfile.md' is in submodule 'x'
  • The authenticity of host can't be established
  •  *
     !app/etc/modules/My_Module.xml
     !app/etc/code/community/My/Module
     !app/etc/code/community/My/Module/*
    

    This seems a much easier approach but where do I initialise each working directory because they are all spread out from ./ I need to git init many repositories at the same locations each with different .gitignore files. I’d actually prefer the symlinking options because it gives me one place i can package my extensions from.
    Thanks in advance.

  • Remove Old Commit from source code
  • How to find which commits removed a line that contain a specific string?
  • only include file once in git repository
  • Merge error after converting Git submodule to subtree
  • Git remote branch reuse huge files
  • Git always merge without a fast-forward, except for when pulling?
  • One Solution collect form web for “Creating a per module git repo environment for magento module development on one site”

    That tutorial references it, but if you haven’t tried it yet I would recommend using modman as a much less maintenance heavy option compared to creating all the symlinks manually as per the tutorial. It will do an identical job, and will automatically create the symlinks for you according to a simple configuration file allowing you to develop externally to the magento install and thus create a repository containing only the extension which it sounds like you would prefer.

    It’s worth checking permissions and ownership of the files in your install – note that symlinks themselves will only themselves ever have permissions of 777 (world read/write) but will use the permissions of the file they reference, so check the permissions of the files you are symlinking to which will need to be sufficient for the web server user to access them.

    With respect to using a whitelist, you can’t initialise multiple repositories at the same location, but branching would be another solution if you don’t mind all extensions being in the same repository just on different branches.

    To my mind considering your requirements using modman with correct user and group ownership and permissions is going to offer you the best solution.

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