1
0
Fork 0

Merging upstream version 0.10.10.

Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
Daniel Baumann 2025-02-11 18:39:16 +01:00
parent 77e95bf22e
commit 8ed672cb80
Signed by: daniel
GPG key ID: FBB4F0E80A80222F
9 changed files with 253 additions and 99 deletions

110
README.md
View file

@ -3,6 +3,7 @@
[![codecov](https://codecov.io/gh/nosarthur/gita/branch/master/graph/badge.svg)](https://codecov.io/gh/nosarthur/gita)
[![licence](https://img.shields.io/pypi/l/gita.svg)](https://github.com/nosarthur/gita/blob/master/LICENSE)
[![PyPI - Downloads](https://img.shields.io/pypi/dm/gita.svg)](https://pypistats.org/packages/gita)
[![Gitter](https://badges.gitter.im/nosarthur/gita.svg)](https://gitter.im/nosarthur/gita?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
[![Chinese](https://img.shields.io/badge/-中文-lightgrey.svg)](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.
![gita screenshot](https://github.com/nosarthur/gita/raw/master/doc/screenshot.png)
@ -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 [![Join the chat at https://gitter.im/nosarthur/gita](https://badges.gitter.im/nosarthur/gita.svg)](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!
[![TpOut](https://github.com/TpOut.png?size=40 "TpOut")](https://github.com/TpOut)
[![PabloCastellano](https://github.com/PabloCastellano.png?size=40 "PabloCastellano")](https://github.com/PabloCastellano)
[![cd3](https://github.com/cd3.png?size=40 "cd3")](https://github.com/cd3)
[![Steve-Xyh](https://github.com/Steve-Xyh.png?size=40 "Steve-Xyh")](https://github.com/Steve-Xyh)
## Other multi-repo tools