Display the 'git status' in sub-directories
Project description
git-substatus
A command-line tool to inspect the status of git repositories from a directory, like a projects folder keeping the git projects. You can therefore view:
-
status
-
added, removed, modified, renamed
-
merge conflicts
-
etc.
-
-
stash
Usage
See more at git-substatus --help
Installation
Install from the PyPI:
pip install git-substatus
Install from the repo:
pip install git+https://github.com/strboul/git-substatus.git
Alternatively, the Docker image can be used:
docker run --rm -t -v "$(pwd)":/"$(pwd)" -w "$(pwd)" strboul/git-substatus:latest <optional-path>
To shorten the command, it's also possible to add an alias in the .bashrc
or
.zshrc
, e.g.:
_git_substatus() {
docker run --rm -t -v "$(pwd)":/"$(pwd)" -w "$(pwd)" strboul/git-substatus:latest "$@"
}
alias git-substatus="_git_substatus"
Benchmark: I measured that the container solution is about 70% slower than the native operation, most likely due to the overhead; however, the container is still useful when portability matters.
Development
This module has no module dependency outside The Python Standard Library.
Development docs
Run tests && debugging
virtualenv venv
source venv/bin/activate # deactivate
pip install -r dev-requirements.txt # pip freeze > dev-requirements.txt
make all
Put a breakpoint()
at a relevant place and run:
make test
Add new methods
- Use the reference to name the functions/methods in the module: https://mirrors.edge.kernel.org/pub/software/scm/git/docs/gitglossary.html
Sending a PR
-
Bump up the version -
major.minor.path
(depends on the change) Change the version in the filegit_substatus/__init__.py
. -
Write/update unit tests (where relevant). You can start by adding/modifying a case to generator file
tests/gen_test_repos.sh
.
Release
(needs credentials)
- Release to PyPi
make release-pypi
- Release to Docker Hub
make docker-build
make docker-release
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for git_substatus-0.2.8-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 97080e337c4b1783fddece018ba04205c2dd7b5d51541076816ba57286f7ed2f |
|
MD5 | 4601fcc318fb3bb50c9c6c09d9b9da82 |
|
BLAKE2b-256 | ef39e7e446dbff77294facde2810a9632abd0df286af674d49f3a724c1c020ad |