Skip to content
/ gitm Public
forked from makelinux/gitm

Multiple git replication utility

License

Notifications You must be signed in to change notification settings

zanscree/gitm

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

git-m - multiple git replication and management tool

There are great tools for multiple gits (git repositories) management: repo and git submodules. But sometimes you can have dozens or hundreds of standalone gits which you would like to manage without overhead of manual initialization of repo or git submodules.

The mission of git-m is to simplify work with multiple gits.

To use git-m as custom git command copy it to PATH, for example to /usr/local/bin.

git m -h

Standalone git [repository] is r. which is not included in repo or submodules.

git m --export

Then copy status.yaml to another host or location and run

git m --import

One-liner to replicate gits to another host:

git m --export - | ssh $HOST "mkdir -p $DIR; cd $DIR; git m --import -; ls"

To use git-m with original git command just use arguments of git as arguments of git-m. If git-m is installed as custom command just add "m" between "git" and original command.

Git refuses to work from outer directory:

$ git log some_project/some_file
fatal: not a git repository (or any parent up to mount point /)

You can use option -C

More easy just to use git-m. It changes directory to destination directory and performs requested command:

$ git m log some_project/some_file

This feature saves you from splitting patches and changing current directories between many repositories.

$ git m describe --always --all
project .
heads/master
project A
heads/master
project B
heads/master

Please see the built-in help for details.

  • pretty text table with shortened strings
  • csv
  • sha
  • JSON
  • YAML

Please see the built-in help for details.

git-m --help

sudo pip3 install ago prettytable repository munch pandas

sudo apt-get -f install python3-git

  • Accept list of files as input. For example pipe from: find . -name '.git' -printf "%hn"
  • You are welcome to request new features

About

Multiple git replication utility

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 87.5%
  • Shell 12.5%