Merging upstream version 0.10.10.
Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
parent
77e95bf22e
commit
8ed672cb80
9 changed files with 253 additions and 99 deletions
110
README.md
110
README.md
|
@ -3,6 +3,7 @@
|
|||
[](https://codecov.io/gh/nosarthur/gita)
|
||||
[](https://github.com/nosarthur/gita/blob/master/LICENSE)
|
||||
[](https://pypistats.org/packages/gita)
|
||||
[](https://gitter.im/nosarthur/gita?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
|
||||
[](https://github.com/nosarthur/gita/blob/master/doc/README_CN.md)
|
||||
|
||||
```
|
||||
|
@ -21,9 +22,9 @@
|
|||
This tool does two things
|
||||
|
||||
- display the status of multiple git repos such as branch, modification, commit message side by side
|
||||
- delegate git commands/aliases from any working directory
|
||||
- (batch) delegate git commands/aliases from any working directory
|
||||
|
||||
If several repos compile together, it helps to see their status together too.
|
||||
If several repos are related, it helps to see their status together too.
|
||||
I also hate to change directories to execute git commands.
|
||||
|
||||

|
||||
|
@ -75,6 +76,56 @@ By default, only `fetch` and `pull` take optional input.
|
|||
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.
|
||||
|
||||
## Installation
|
||||
|
||||
To install the latest version, run
|
||||
|
||||
```
|
||||
pip3 install -U gita
|
||||
```
|
||||
|
||||
If development mode is preferred,
|
||||
download the source code and run
|
||||
|
||||
```
|
||||
pip3 install -e <gita-source-folder>
|
||||
```
|
||||
|
||||
In either case, calling `gita` in terminal may not work,
|
||||
then you can put the following line in the `.bashrc` file.
|
||||
|
||||
```
|
||||
alias gita="python3 -m gita"
|
||||
```
|
||||
|
||||
Windows users may need to enable the ANSI escape sequence in terminal, otherwise
|
||||
the branch color won't work.
|
||||
See [this stackoverflow post](https://stackoverflow.com/questions/51680709/colored-text-output-in-powershell-console-using-ansi-vt100-codes) for details.
|
||||
|
||||
## Auto-completion
|
||||
|
||||
Download
|
||||
[.gita-completion.bash](https://github.com/nosarthur/gita/blob/master/.gita-completion.bash)
|
||||
or
|
||||
[.gita-completion.zsh](https://github.com/nosarthur/gita/blob/master/.gita-completion.zsh)
|
||||
and source it in the .rc file.
|
||||
|
||||
## Superman mode
|
||||
|
||||
The superman mode delegates any git command/alias.
|
||||
Usage:
|
||||
|
||||
```
|
||||
gita super [repo-name(s) or group-name(s)] <any-git-command-with-or-without-options>
|
||||
```
|
||||
|
||||
Here `repo-name(s)` or `group-name(s)` are optional, and their absence means all repos.
|
||||
For example,
|
||||
|
||||
- `gita super checkout master` puts all repos on the master branch
|
||||
- `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
|
||||
|
||||
Custom delegating sub-commands can be defined in `$XDG_CONFIG_HOME/gita/cmds.yml`
|
||||
|
@ -136,22 +187,6 @@ extra_info_items = {'delim': get_delim}
|
|||
If it works, you will see these extra items in the 'Unused' section of the
|
||||
`gita info` output. To use them, edit `$XDG_CONFIG_HOME/gita/extra_repo_info.py`.
|
||||
|
||||
## Superman mode
|
||||
|
||||
The superman mode delegates any git command/alias.
|
||||
Usage:
|
||||
|
||||
```
|
||||
gita super [repo-name(s) or group-name(s)] <any-git-command-with-or-without-options>
|
||||
```
|
||||
|
||||
Here `repo-name(s)` or `group-name(s)` are optional, and their absence means all repos.
|
||||
For example,
|
||||
|
||||
- `gita super checkout master` puts all repos on the master branch
|
||||
- `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`
|
||||
|
||||
## Requirements
|
||||
|
||||
Gita requires Python 3.6 or higher, due to the use of
|
||||
|
@ -163,38 +198,6 @@ Thus the installed git version may matter.
|
|||
I have git `1.8.3.1`, `2.17.2`, and `2.20.1` on my machines, and
|
||||
their results agree.
|
||||
|
||||
## Installation
|
||||
|
||||
To install the latest version, run
|
||||
|
||||
```
|
||||
pip3 install -U gita
|
||||
```
|
||||
|
||||
If development mode is preferred,
|
||||
download the source code and run
|
||||
|
||||
```
|
||||
pip3 install -e <gita-source-folder>
|
||||
```
|
||||
|
||||
In either case, calling `gita` in terminal may not work,
|
||||
then you can put the following line in the `.bashrc` file.
|
||||
|
||||
```
|
||||
alias gita="python3 -m gita"
|
||||
```
|
||||
|
||||
Windows users may need to enable the ANSI escape sequence in terminal, otherwise
|
||||
the branch color won't work.
|
||||
See [this stackoverflow post](https://stackoverflow.com/questions/51680709/colored-text-output-in-powershell-console-using-ansi-vt100-codes) for details.
|
||||
|
||||
## Auto-completion
|
||||
|
||||
Download
|
||||
[.gita-completion.bash](https://github.com/nosarthur/gita/blob/master/.gita-completion.bash)
|
||||
and source it in `.bashrc`.
|
||||
|
||||
## Contributing
|
||||
|
||||
To contribute, you can
|
||||
|
@ -203,12 +206,14 @@ To contribute, you can
|
|||
- request/implement features
|
||||
- star/recommend this project
|
||||
|
||||
Chat room is available on [](https://gitter.im/nosarthur/gita?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
|
||||
|
||||
To run tests locally, simply `pytest`.
|
||||
More implementation details are in
|
||||
[design.md](https://github.com/nosarthur/gita/blob/master/doc/design.md).
|
||||
A step-by-step guide to reproduce this project is [here](https://nosarthur.github.io/side%20project/2019/05/27/gita-breakdown.html).
|
||||
|
||||
You can also make donation to me on [patreon](https://www.patreon.com/nosarthur).
|
||||
Any amount is appreciated!
|
||||
You can also sponsor me on [GitHub](https://github.com/sponsors/nosarthur). Any amount is appreciated!
|
||||
|
||||
## Contributors
|
||||
|
||||
|
@ -220,6 +225,7 @@ Any amount is appreciated!
|
|||
[](https://github.com/TpOut)
|
||||
[](https://github.com/PabloCastellano)
|
||||
[](https://github.com/cd3)
|
||||
[](https://github.com/Steve-Xyh)
|
||||
|
||||
## Other multi-repo tools
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue