Package: git-cola
git-cola: The highly caffeinated Git GUIGit Cola is a powerful Git GUI with a slick and intuitive user interface.git clone https://github.com/git-cola/git-cola.gitScreenshotsDownloadsDocumentationKeyboard shortcutsHTML documentationGit Cola documentationGit DAG documentationContributing guidelinesRequirementsBuildSphinxis used to generate the documentation.RuntimeGit2.2.0 or newer.Python3.6 or newer.QtPy2.0.0 or newer.Git Cola uses QtPy, so you can choose between PyQt6, PyQt5 and PySide2 by setting
theQT_APIenvironment variable topyqt6,pyqt5orpyside2as desired.qtpydefaults topyqt5and falls back topyqt6andpyside2ifpyqt5is not installed.Any of the following Python Qt libraries must be installed:PyQt5 / PyQt65.9 or newer is required. Qt 6.2 or newer is also supported via QtPy.PySide25.12.0 or newer.Optional FeaturesGit Cola enables additional features when the following
Python modules are installed.Send2Trashenables cross-platform "Send to Trash" functionality.
(source)pyobjcenables macOS-specific application themes on macOS.
(source)InstallationThere are several ways to install Git Cola but you do not need to "install" Git Cola
in order to run it.Git Cola is designed to run directly from its source tree. Installation is optional.From SourceThe recommended approach for running the latest Git Cola version is to install its
PyQt dependencies using your distribution's package manager and then run./bin/git-coladirectly from source.Installing PyQt dependencies on Debian / Ubuntu systemsGit Cola works with either PyQt5 or PyQt6 because it uses theqtpylibrary for PyQt compatibility.PyQt5Users on newer Debian/Ubuntu version can install a single package to run from source.sudoaptinstallpython3-qtpyIf you are on an older version that does not havepython3-qtpyavailable then you can
install the following packages directly.sudoaptinstallpython3-pyqt5python3-pyqt5.qtopenglpython3-pyqt5.qtwebenginepython3-pyqt5.qtsvgPyQt6If you'd like to use Git Cola with the newer PyQt6 ecosystem then you can install these
packages instead of PyQt5.sudoaptinstallpython3-pyqt6python3-pyqt6.qtsvgpython3-pyqt6.qtwebengineAt this point you should be able to launch./bin/git-colafrom the source tree and
there is nothing more to do.The further instructions below detail how to install Git Cola from PyPI or how to
install it into a location separate from the source tree.LinuxLinux is it! Your distro has probably already packagedgit-cola.
If not, please file a bug against your distribution ;-)ArchAvailable in theAUR.Debian, Ubuntuapt install git-colaFedoradnf install git-colaGentooemerge git-colaOpenSUSE, SLEzypper install git-colaSlackwareAvailable inSlackBuilds.org.UbuntuSee herefor the
versions that are available in Ubuntu's repositories.FreeBSD# Install from official binary packages
pkg install -r FreeBSD devel/git-cola

# Build from source
cd /usr/ports/devel/git-cola && make clean installInstall into a Python Virtualenv from PyPI using pipIMPORTANT: never runpip installorgarden installoutside of a
Python virtualenv or as root!IMPORTANT: if you are on Linux distributions where PyQt6 or PyQt5 are available from
your package manager then it is highly recommended to install those dependencies using
your system's package manager. See the section above for details.One way to install the latest released version is to usevenv(virtualenv) andpip.
This installsgit-cola from pypi.org.python3 -m venv --system-site-packages env3
./env3/bin/pip install git-cola
./env3/bin/git-colaAdd theenv3/bindirectory to yourPATHor symlink tobin/git-colafrom
somewhere in yourPATHsuch as~/.local/bin/git-cola, and you can launch
Git Cola like any other built-ingitcommand:git cola
git dagInstall into a Python Virtualenv from SourceIf you don't have PyQt installed then the easiest way to get it is to use a Python
virtualenv and install Git Cola into it in "editable" mode.This install method lets you upgrade Git Cola by runninggit pull.# Create a virtualenv called "env3" and activate it.
python3 -m venv --system-site-packages env3

# Install PyQt and (optional) extra packages to enable all features.
./env3/bin/pip install --editable '.[extras,pyqt6]'

# Run Git Cola via the "git-cola" Git subcommand.
source env3/bin/activate
git colaIf you addenv3/bin(or symlink toenv3/bin/git-cola) somewhere in your$PATHthen you can
rungit colaas if it were a builtingitcommand from outside of the virtualenv
(e.g. after running "deactivate" or when opening a new shell).Standalone Installation from SourceRunninggarden -D prefix=$HOME/.local installwill install Git Cola in your$HOME/.localdirectory ($HOME/.local/bin/git-cola,$HOME/.local/lib, etc).This installation method assumes that theqtpyandPyQt*dependencies have
been pre-installed.The Garden recipe also supportsDESTDIRto support creating packages for Linux package
managers:garden -D DESTDIR=/tmp/stage -D prefix=/usr/local installIf you do not havegardenavailable thenmakecan be used instead.
TheMakefilesupports staged installs using the conventionalDESTDIRandprefixvariables.make DESTDIR=/tmp/stage prefix=/usr/local installmacOSFor most end-users we recommend using either Homebrew or installing into
a Python virtualenv as described above.You can install Git Cola from source using the same steps as above.HomebrewAn easy way to install Git Cola is to useHomebrew.
Use Homebrew to install the git-cola recipe:brew install git-colaIf you install using Homebrew you can stop at this step.
You don't need to clone the repo or anything.git-cola.appIf you have all of the dependencies installed, either viapiporbrewthen
you can build a shellgit-cola.appapp bundle wrapper for use in/Applications.If you'd like to build agit-cola.appbundle for/Applicationsrun this command:garden macos/appYou will need to periodically rebuild the app wrapper whenever Python is upgraded.Updating macOS and HomebrewUpdating macOS can often break Homebrew-managed software.If you upgrade your macOS version and Git Cola no longer runs then then it is
recommended that you re-install Git Cola's dependencies after upgrading.A quick fix when upgrading to newer versions of XCode or macOS is to
reinstall PyQt6.brew reinstall pyqt@6You may also need to relink your pyqt installation:brew link pyqt@6This is required when upgrading to a modern (post-10.11 El Capitan) Mac OS X.
Homebrew now bundles its own Python3 installation instead of using the
system-provided default Python.If the "brew reinstall" command above does not work then re-installing from
scratch using the instructions below should get things back in shape.# update homebrew
brew update

# uninstall git-cola and its dependencies
brew uninstall git-cola
brew uninstall pyqt5
brew uninstall sip

# re-install git-cola and its dependencies
brew install git-colaWindowsIMPORTANT If you have a 64-bit machine, install the 64-bit versions only.
Do not mix 32-bit and 64-bit versions.Download and install the following:Git for WindowsGit ColaOnce these are installed you can run Git Cola from the Start menu.See "Windows (Continued)" below for more details.If you'd like to install Git Cola withwingetrun the following command:winget install git-cola.git-colaAs there is no dependency resolution yet you have to install Git as well with:winget install Git.GitGoodiesGit Cola ships with an interactive rebase editor calledgit-cola-sequence-editor.git-cola-sequence-editoris used to reorder and choose commits when rebasing.
Start an interactive rebase through the "Rebase" menu, or through thegit cola rebasesub-command to use thegit-cola-sequence-editor:git cola rebase @{upstream}git-cola-sequence-editorcan be launched independently of git cola by tellinggit rebaseto use it as its editor through theGIT_SEQUENCE_EDITORenvironment variable:export GIT_SEQUENCE_EDITOR="$HOME/git-cola/bin/git-cola-sequence-editor"
git rebase -i @{upstream}Shell CompletionsShell completion scripts are available for bash and zsh.
Each script contains instructions on how to install and activate the completions.bash completion scriptzsh completion scriptGit Cola Sub-commandsThegit-colacommand exposes various sub-commands that allow you to quickly
launch tools that are available from within the git-cola interface.
For example,git cola findlaunches the file finder,
andgit cola greplaunches the grep tool.Seegit cola --help-commandsfor the full list of commands.$ git cola --help-commands
usage: git-cola [-h]

                {cola,am,archive,branch,browse,config,
                 dag,diff,fetch,find,grep,merge,pull,push,
                 rebase,remote,search,stash,tag,version}
                ...

valid commands:
  {cola,am,archive,branch,browse,config,
   dag,diff,fetch,find,grep,merge,pull,push,
   rebase,remote,search,stash,tag,version}

    cola                start git-cola
    am                  apply patches using "git am"
    archive             save an archive
    branch              create a branch
    browse              browse repository
    config              edit configuration
    dag                 start git-dag
    diff                view diffs
    fetch               fetch remotes
    find                find files
    grep                grep source
    merge               merge branches
    pull                pull remote branches
    push                push remote branches
    rebase              interactive rebase
    remote              edit remotes
    search              search commits
    stash               stash and unstash changes
    tag                 create tags
    version             print the versionDevelopmentIf you already have Git Cola's dependencies installed then you can
startcolaas a Python module if you have the source code available.python -m cola
python -m cola dagThe following commands should be run during development:# Run the unit tests
$ garden test

# Run tests and longer-running pylint checks
$ garden check

# Run tests against multiple python interpreters using tox
$ garden toxThe test suite can be found in thetestdirectory.Commits and pull requests are automatically tested for code quality
usingGitHub Actions.Auto-formatcola/i18n/*.pofiles before committing when updating translations:$ garden poWhen submitting patches, consult thecontributing guidelines.Packaging NotesGit Cola installs its modules into the default Python site-packages directory
(e.g.lib/python3.7/site-packages) using setuptools.While end-users can usepip install git-colato install Git Cola, distribution
packagers should use thegarden -D prefix=/usr installprocess. Git Cola's Garden
recipe wrapspip install --prefix=<prefix>to provide a packaging-friendlygarden installtarget.Windows (Continued)Microsoft Visual C++ 2015 RedistributableEarlier versions of Git Cola may have shipped withoutvcruntime140.dlland may
not run on machines that are missing this DLL.To fix this, download theMicrosoft Visual C++ 2015 Redistributableand install itGit Cola v4.0.0 and newer include this DLL and do not require this to be installed
separately.DevelopmentIn order to develop Git Cola on Windows you will need to install
Python3 and pip.  Install PyQt5 usingpip install PyQt5to make the PyQt5 bindings available to Python.Once these are installed you can usepython.exeto run
directly from the source tree.  For example, from a Git Bash terminal:/c/Python39/python.exe ./bin/git-colaMultiple Python versionsIf you have multiple versions of Python installed, thecontrib/win32/colalauncher script might choose the newer version instead of the python
that has PyQt installed.  In order to resolve this, you can set thecola.pythonlocationgit configuration variable to tell cola where to
find python.  For example:git config --global cola.pythonlocation /c/Python39Building Windows InstallersWindows installers are built usingPynsist.NSISis also needed.To build the installer using Pynsist run:./contrib/win32/run-pynsist.shThis will generate an installer inbuild/nsis/.Windows "History Browser" Configuration UpgradeYou may need to configure your history browser if you are upgrading from an
older version of Git Cola on Windows.gitkwas originally the default history browser, butgitkcannot be
launched as-is on Windows becausegitkis a shell script.If you are configured to usegitk, then change your configuration to
go through Git'ssh.exeon Windows.  Similarly, we must go throughpython.exeif we want to usegit-dag.If you want to use gitk as your history browser open the
Preferences screen and change the history browser command to:"C:/Program Files/Git/bin/sh.exe" --login -i C:/Git/bin/gitkgit-dagbecame the default history browser on Windows inv2.3, so new
users do not need to configure anything.