/mgr2

My Git Repos Manager bash shell script

Primary LanguageShell

About

My Git Repos Manager (mgrmgr, or mgr2) is a small Bash shell script that can automatically pull or push commits for a list of git repositories defined by user.

Usage

Basic usage

To fill the default pull list of git repositories use the following Bash commands:

cd /path/to/a/first/git/repo
mgr2 add pull  # adds the current working dir to the default pull list
cd /path/to/a/second/git/repo
mgr2 add pull  # adds the current working dir to the default pull list

To pull commits into the default list of git repositories use the following Bash command:

mgr2 pull  # pulls commits into all the dirs in the default pull list

Filling the default push list of git repositories and pushing commits from it can be done the same way:

cd /path/to/a/first/git/repo
mgr2 add push  # adds the current working dir to the default push list
cd /path/to/a/second/git/repo
mgr2 add push  # adds the current working dir to the default push list
mgr2 push  # pushes commits from all the dirs in the default push list

Custom lists

To fill a custom list of git repositories both for pulling and pushing use the following Bash commands:

cd /path/to/a/first/git/repo
mgr2 add list_name  # adds the current working dir to a custom list
cd /path/to/a/second/git/repo
mgr2 add list_name  # adds the current working dir to a custom list
mgr2 pull list_name  # pulls commits into all the dirs in the list 'list_name'
mgr2 push list_name  # pushes commits from all the dirs in the list 'list_name'