This is a simple git GUI for tagging commits.
Note: GUI style may not look native on Ubuntu, because this uses PyQt5 distributed by pip.
pip3 install --user git+https://github.com/Ambrosys/tgit.git#egg=tgit
Note: GUI style may not look native on Ubuntu, because this uses PyQt5 distributed by pip.
- git clone this project into some directory.
- cd into it
- Run:
pip3 install --user -e .
This uses PyQt5 distributed by your distribution.
- Run:
sudo apt install python3-pyqt5 pip3 install --user ansi2html scikit-image
- git clone this project into some directory.
- Create executable tgit script (adjust
/path/to/tgit-repository
):#!/bin/bash PYTHONPATH="$PYTHONPATH:/path/to/tgit-repository" python3 -m tgit.cli.tgit
- Create executable tgit-show-colors script (adjust
/path/to/tgit-repository
):#!/bin/bash PYTHONPATH="$PYTHONPATH:/path/to/tgit-repository" python3 -m tgit.cli.show_colors
pip3 uninstall -y tgit pyqt5 sip
# May be necessary:
rm ~/.local/bin/tgit
rm ~/.local/bin/tgit-show-colors
usage: tgit [-h] [-b BRANCH] [-n] [--full-numstat] [-c DIR] [--tags FILENAME]
[--authors FILENAME] [--commits FILENAME] [--repository FILENAME]
[--cache FILENAME] [--no-diff]
[root] [paths [paths ...]]
tgit is a simple git GUI for tagging commits.
positional arguments:
root root directory of the repository, default: .
paths restrict to given paths
optional arguments:
-h, --help show this help message and exit
-b BRANCH, --branch BRANCH
branch name, default: master
-n, --no-numstat do not call git log --numstat (faster)
--full-numstat call git log --numstat for excluded files (slower)
-c DIR, --config-dir DIR
directory for config files, default: .
--tags FILENAME tags config file, default: tgit-tags.json
--authors FILENAME authors config file, default: tgit-authors.json
--commits FILENAME commits config file, default: tgit-commits.json
--repository FILENAME
repository config file, default: tgit-repository.json
--cache FILENAME cache for commit history, default: tgit-cache.json
--no-diff deactivate "automatically diff all files"
Paths given are used to restrict git log commands and to limit the "find file" filter. If commits contain files that match, unmatched files are still listed in the files list but are greyed out.
You can give exclude regex patterns by prepending the path with a colon, for
example ":.*\\bfiles\\.cmake
".
These are not used in git log commands but to limit the "find file" filter.
The GUI has several commit filters. Most of them are self-explanatory and not described here.
This filter analyzes commits with one of the specified tags and selects all
commits related to them. Related means that they have files which are getting
modified by the analyzed commits (backward-search in history, see also
git log --follow
) or that they have files which were modified by the
analyzed commits in the past (forward-search in history).
Each config file is optional. But to be able to tag commits tgit-tags.json
has to be given.
This file defines the tags (in user-definable groups) which can be assigned to commits.
Example:
{
"feature": [
"feature 1",
"feature 2",
"other"
],
"misc": [
"refactoring",
"bugfix"
],
"style": [
"comment",
"formatting"
],
"status": [
"merged"
]
}
This file defines author groups and author mappings (to simplify the UI).
You can assign a color to a name by adding the color code to the name (readable for PyQt5.QtGui.QColor). Authors with no color assoziation will get one from the integrated color palette.
Example:
{
"core": {
"Fabian #008000": ["Fabian Sandoval", "FabianSandoval"],
"John": ["John Doe"]
},
"other": {
"Max": ["Max Mustermann"]
}
}
This file is maintained by the program.
Example:
{
"d9e4f8e": [
"feature 1"
],
"d884a59": [
"feature 2",
"merged"
]
}
This file can define two things (each are optional):
- The root directory of the repository
(overrides positional argument
root
). - Paths relative to the repository root to restrict the commits list
(additive to
--paths
) or exclude patterns (prepended with a colon).
Example:
{
"root": "..",
"paths": [
"dir",
"file",
"sub/path",
":exclude-pattern"
]
}
Lists all colors defined in an authors file (if given) and the colors of the integrated color palette and how they will be rendered in the commits view.
tgit-show-colors -h
usage: tgit-show-colors [-h] [--authors FILENAME]
Color test utility for tgit.
optional arguments:
-h, --help show this help message and exit
--authors FILENAME authors config file, default: tgit-authors.json