This is a simple
gtk based script to provide a visual status check of
multiple git repo's. It was spawned from
batchgit, a bash script to perform
batch operations on multiple repo's. This indicator is designed to work with
batchgit, but could with a small amount of setup work independently.
The basic idea is that it runs at startup and creates an icon. The icon gives an overview of all the listed repo's. When clicked, the icon lists all the repo's and their individual status. For example here is a screenshot of my system: Here we have one repo with commits to be pushed (an up-arrow) and so the main icon displays a warning symbol.
I have attempted to keep it as simple as possible so it should make sense without reading the behaviour section. If you have any questions or would like to see something done differently please let me know.
When first opened, all repo's in
~/.batchgit are checked against the remote.
A label is assigned of the form ahead, diverged, behind, up-to-date or no-state
is recorded for each repo. The menu is then set-up in the following way: The
main menu icon displays some global information - either all OK, or action
required; each individual menu item is assigned a symbol to reflect its current
status. In addition each menu item is given a
+n to indicate the
The indicator then periodically checks all repo's with a frequency set by
update_period (by default this is 100 seconds). On these periodic checks the
remote is not tested. To update against the remote a
manual update entry
is provided in the menu itself.
When run with the
--no_remoteflag, all remote checking is disabled. This # may be useful if you know you have no internet connection, or the remote checking is extremely slow.
The default rcfile if
.batchgitrcfor compatibility with Max's batchgotrc. If you want to have something different then run with
checkgit can be installed with
pip install checkgit. Alternatively if you
want to install it from source, then clone the repo and
$ python setup.py install
Once installed, you'll have an executable
checkgit on your
when called will start the indicator. Note that to work properly
requires a file
~/.batchgitrc listing the repos to check.
If you just want to see how this works then simply run
from this directory. Note: this will require a
.batchgitrc in your home dir.
For example just create a file
~/.batchgitrc with the contents
Then the quickstart will run
The setup for automatically starting checkgit will depend on which system you are using. Here are instructions for each known system:
We will add a
.desktop file as described
Simply put, there is a folder
~/.config/autostart/, which will contain
several files with extensions
.desktop. These are programs to run at startup,
so to get checkgit to run at startup simply add a file named say
[Desktop Entry] Type=Application Exec=checkgit Hidden=false NoDisplay=false X-GNOME-Autostart-enabled=true Name[en_GB]=checkgit Name=checkgit Comment[en_GB]= Comment=
We can also add command line options to the
Exec line, for example if you want
to run without checking remotes.
Of course this idea is not original, or even as well implemented the alternative, so you may prefer to look at:
- UbikZ git-indicator: An indicator for the Unity panel which finds all repo's in home directory. This is very much a more developed version.
checkgit does not rely on the Unity panel, so it has that going for
There is also
- sickill git-dude: Not actively developed, but provides pop-up notifications for changes.
- Add support for changing
- Remove path to home directory from directories
- Add hotkey support to open
- Integrate with batchgit so that you can pull etc. from the menu