From 715f81ffde428759c902cdd16c9b8d03f2bdf463 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Mon, 2 Nov 2020 16:57:16 +0100 Subject: Adding upstream version 0.11.9. Signed-off-by: Daniel Baumann --- README.md | 56 ++++++++++++++++++++++++++++++++++++++++++-------------- 1 file changed, 42 insertions(+), 14 deletions(-) (limited to 'README.md') diff --git a/README.md b/README.md index d6efa14..a545b64 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ | | ____ | | | | | ___ | | | \_ ) | | | | | ( ) | | (___) |__) (___ | | | ) ( | -(_______)_______/ )_( |/ \| v0.10 +(_______)_______/ )_( |/ \| v0.11 ``` # Gita: a command-line tool to manage multiple git repos @@ -29,7 +29,14 @@ I also hate to change directories to execute git commands. ![gita screenshot](https://github.com/nosarthur/gita/raw/master/doc/screenshot.png) -Here the branch color distinguishes 5 situations between local and remote branches: +In the screenshot, the `gita remote nowhub` command translates to `git remote -v` +for the `nowhub` repo. +To see the pre-defined sub-commands, run `gita -h` or take a look at +[cmds.yml](https://github.com/nosarthur/gita/blob/master/gita/cmds.yml). +To add your own sub-commands, see the [customization section](#custom). +To run arbitrary `git` command, see the [superman mode section](#superman). + +The branch color distinguishes 5 situations between local and remote branches: - white: local has no remote - green: local is the same as remote @@ -50,32 +57,50 @@ The additional status symbols denote The bookkeeping sub-commands are - `gita add `: add repo(s) to `gita` -- `gita rm `: remove repo(s) from `gita` (won't remove files from disk) -- `gita group`: show grouping of the repos -- `gita group `: group repos -- `gita ungroup `: remove grouping for repos +- `gita context`: context sub-command + - `gita context`: show current context + - `gita context none`: remove context + - `gita context `: set context to `group-name`, all operations then only apply to repos in this group +- `gita color`: color sub-command + - `gita color [ll]`: Show available colors and the current coloring scheme + - `gita color set `: Use the specified color for the local-remote situation +- `gita group`: group sub-command + - `gita group add -n `: add repo(s) to a new group or existing group + - `gita group [ll]`: display existing groups with repos + - `gita group ls`: display existing group names + - `gita group rename `: change group name + - `gita group rm `: delete group(s) +- `gita info`: info sub-command + - `gita info [ll]`: display the used and unused information items + - `gita info add `: enable information item + - `gita info rm `: disable information item - `gita ll`: display the status of all repos - `gita ll `: display the status of repos in a group - `gita ls`: display the names of all repos - `gita ls `: display the absolute path of one repo - `gita rename `: rename a repo -- `gita info`: display the used and unused information items +- `gita rm `: remove repo(s) from `gita` (won't remove files from disk) - `gita -v`: display gita version -Repo paths are saved in `$XDG_CONFIG_HOME/gita/repo_path` (most likely `~/.config/gita/repo_path`). - The delegating sub-commands are of two formats - `gita [repo-name(s) or group-name(s)]`: - optional repo or group input, and no input means all repos. + optional repo or group input, and **no input means all repos**. - `gita `: required repo name(s) or group name(s) input +In either case, the `gita` command translates to running `git ` for the corresponding repos. By default, only `fetch` and `pull` take optional input. +To see the pre-defined sub-commands, run `gita -h` or take a look at +[cmds.yml](https://github.com/nosarthur/gita/blob/master/gita/cmds.yml). +To add your own sub-commands, see the [customization section](#custom). +To run arbitrary `git` command, see the [superman mode section](#superman). If more than one repos are specified, the git command will run asynchronously, with the exception of `log`, `difftool` and `mergetool`, which require non-trivial user input. +Repo paths are saved in `$XDG_CONFIG_HOME/gita/repo_path` (most likely `~/.config/gita/repo_path`). + ## Installation To install the latest version, run @@ -110,7 +135,7 @@ or [.gita-completion.zsh](https://github.com/nosarthur/gita/blob/master/.gita-completion.zsh) and source it in the .rc file. -## Superman mode +## Superman mode The superman mode delegates any git command/alias. Usage: @@ -126,7 +151,7 @@ For example, - `gita super frontend-repo backend-repo commit -am 'implement a new feature'` executes `git commit -am 'implement a new feature'` for `frontend-repo` and `backend-repo` -## Customization +## Customization Custom delegating sub-commands can be defined in `$XDG_CONFIG_HOME/gita/cmds.yml` (most likely `~/.config/gita/cmds.yml`). @@ -164,8 +189,11 @@ comaster: Another customization is the information items displayed by `gita ll`. The used and unused information items are shown with `gita info` and one can -create `$XDG_CONFIG_HOME/gita/info.yml` to customize it. For example, the -default information items setting corresponds to +create `$XDG_CONFIG_HOME/gita/info.yml` to customize it. +(I am thinking of hiding all these details from user at the moment, which means +you probably don't need to read the rest of this section.) + +For example, the default information items setting corresponds to ```yaml - branch -- cgit v1.2.3