Shell script for Git module deployment with include/exclude filters.
Switch branches/tags
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information. Updated modgit raw content URL Jun 22, 2015
modgit Fixed deployment of submodules without Git files Apr 23, 2013

Deploy multiple Git repositories in an unique folder

modgit is a shell script for deploying multiple Git repositories in root folder of any project, which is not possible with default git submodule command. A common use case would be the easy installation of Magento modules that need to be deployed in root folder.


curl installation

$ curl > modgit
$ chmod +x modgit
$ mv modgit /usr/local/bin

wget installation

$ wget -O modgit
$ chmod +x modgit
$ mv modgit /usr/local/bin

Manual download

  • Download shell script here
  • Copy modgit file to /usr/local/bin (or any folder in your $PATH)
  • Run chmod +x modgit


Install a module

$ cd /path/to/project
$ modgit init
$ modgit add [-n] [-t tag_name] [-b branch_name] <module> <git_repository>

Update a module

$ modgit up [-n] <module>

Update all modules

$ modgit up-all [-n]

Remove a module

$ modgit rm [-n] <module>

Remove all modules

$ modgit rm-all [-n]

List installed modules

$ modgit ls

Show information about an installed module

$ modgit info <module>

Show deployed files of an installed module

$ modgit files <module>

Show help

$ modgit help

Advanced usage

Dry run mode

$ modgit add -n scheduler
  => show what would be done

Include filter

$ modgit add -i lib/ elastica git://
  => will deploy only lib/ folder

Include filter with custom target

$ modgit -i lib/:library/ add elastica git://
  => will deploy only lib/ (remote folder) to library/ (local folder)

Exclude filter

$ modgit add -e tests/ atoum
  => will deploy all remote files and folders, except tests/ folder

Automatic modman compatibility

$ modgit add debug
  => will parse remote modman file for files and folders mapping