The idea is that you have a structure such as:
/workspace .mu_repo <- configuration file (created by mu commands) /repo1 <- git repository /.git /repo2 /.git ...
Then go to the root directory containing the repositories
(in this case
cd /workspace), add the repositories you want
to work with and issue commands to all registered repos.
mu register --recursive registers all sub directories that contain
.git subdirectory. To register only sub directories within the current
mu register --current.
mu accepts registering relative paths for repositories, so, it's possible
to register relative paths in a project repository to handle dependencies
(see Grouping by project directories at Tips & Tricks for more details).
Tip: it may also be used as a git replacement on directories
.mu_repo file is used to store the state used by
mu, and its format
is pretty simple, so, at times it may be easier to edit it directly instead of issuing
mu register repo1 repo2Registers repo1 and repo2 to be tracked. Also accepts a
--currentparameter, that automatically adds all repositories found in the current directory (but not recursively). To automatically add all repositories recursively, use
mu unregister repo1 repo2Unregisters previously tracked repositories (also accepts
mu listLists the currently tracked repositories.
mu set-var git=d:/bin/git/bin/git.exeSet git location to be used. Only needed if git is not found in your
mu set-var serial=0|1Set commands to be executed serially or in parallel.
mu get-varsPrints the configuration file.
mu fix-eolChanges end of lines to
'\n'on all changed files.
mu find-branch [-r] pattern
Finds and prints the branches which match a given pattern. (fnmatch style auto-surrounded with asterisk) (-r to match remote branches)
Note: a shortcut exists for find-branch:
mu fb [-r] pattern
mu git-init-configInitial configuration git (username, log, etc.)
mu auto-updateAutomatically updates mu-repo (using git -- only works if it has been pulled from git, if it was installed with pip, use pip to update it).
mu updFetches changes for the current branch and compares the current branch with the fetched changes (using WinMerge or meld) -- useful to preview incoming changes.
mu rbStashes your current changes, performs a rebase so that your current committed changes are put on top of incoming changes and then unstashes what has been stashed. Note: be careful as it'll do rebase, so, if your changes are already pushed in another branch don't use this command and do a manual merge instead.
mu ddCreates a directory structure with working dir vs head (for the multiple repositores) and opens WinMerge on Windows or Meld on Linux with it (doing mu ac will commit exactly what's compared in this situation).
Note that the structure is created with links to the original files (or automatically synchronized if links are not supported), so files edited in WinMerg/Meld will properly change the original files).
Also accepts a parameter to compare with a different commit/branch. I.e.:
mu dd HEAD^^ mu dd 9fd88da mu dd development
Clones repositories with dependencies. See: Cloning for details.
Allows grouping repositories. See: Grouping for details.
mu sh <command line>
Allows calling any command line in the registered repositories
mu sh ls -lawill call
ls -laon all registered repositories.