LinuxCommandLibrary

git-cola

Graphical Git client for repository management

TLDR

Start the GUI

$ git cola
copy

Start the GUI in amend mode
$ git cola --amend
copy

Prompt for a Git repository. Defaults to the current directory
$ git cola --prompt
copy

Open the Git repository at mentioned path
$ git cola [[-r|--repo]] [path/to/git-repository]
copy

Apply the path filter to the status widget
$ git cola [[-s|--status-filter]] [filter]
copy

SYNOPSIS

git cola [options] [repository]

PARAMETERS

--version
    Display the git-cola version information and exit.

--help
    Show a help message and exit, listing available command-line options.

--repo=<dir>
    Open the specified Git repository located at <dir> instead of the current directory. This is useful for launching git-cola for a specific project.

--amend
    Launch the commit dialog with the 'amend' option pre-selected, allowing the user to modify the most recent commit.

--amend-all
    Perform an amend operation immediately without showing the commit dialog. This is useful for quickly amending changes to the last commit.

--status
    Show the status window upon startup. This is the default behavior if no other view is specified.

--diff
    Show the diff viewer window upon startup, displaying differences between the working tree and the index, or between commits.

--branch
    Open the branch management dialog upon startup, allowing users to create, delete, and switch branches.

--config
    Open the configuration editor dialog upon startup, providing a GUI to manage git-cola and Git settings.

--init-db
    Initialize a new Git repository in the current directory and then open it in git-cola. Useful for starting new projects.

--exec=<command>
    Execute an internal git-cola command directly, such as 'pull', 'push', or 'rebase'. This can be used for automation or specific actions.

--style=<style>
    Set the application GUI style, e.g., 'fusion', 'windows', 'gtk+'. This changes the visual theme of the application.

--prompt
    Force git-cola to prompt the user for a repository to open if one is not found in the current directory or specified via --repo.

--submodule
    Treat the current directory as a submodule, which can affect how certain Git operations are handled within git-cola.

DESCRIPTION

git-cola is a powerful yet simple graphical user interface (GUI) for Git. It provides a comprehensive set of features for interacting with Git repositories, designed for both novice and experienced users. Key functionalities include staging and unstaging changes, creating and amending commits, managing branches, performing merges and rebases, viewing diffs, and exploring repository history. git-cola emphasizes a streamlined workflow and ease of use, leveraging a clean interface built with Qt.

It is cross-platform, running on Linux, macOS, and Windows, and integrates seamlessly with the underlying Git command-line tool. Its flexibility allows users to configure various aspects of its behavior and appearance, making it adaptable to different preferences and workflows.

CAVEATS

git-cola requires a functional Git installation on the system to operate. As a graphical user interface application, it is not suitable for scripting or use in headless server environments. While generally robust, performance might be affected in extremely large repositories or during very complex history manipulation operations. It also depends on Python and the PyQt5 library for its execution.

CONFIGURATION

git-cola extensively uses Git's standard configuration mechanism (git config). Many aspects of its behavior, including default commit messages, integration with external tools, and appearance settings, can be customized globally or per-repository using configuration keys under the cola. namespace (e.g., git config --global cola.auto-fetch true).

KEYBOARD SHORTCUTS

For enhanced productivity, git-cola provides a rich set of keyboard shortcuts for most common actions and navigation. These shortcuts are often displayed next to menu items, allowing power users to quickly perform operations without relying on mouse clicks.

EXTENSIBILITY WITH ACTIONS

Users can extend git-cola's functionality by defining custom 'actions'. These actions, configured via git config, appear in git-cola's menus and can execute external scripts or commands, enabling deep integration with specialized workflows or tools.

HISTORY

git-cola was created by David Aguilar, with its initial development dating back to late 2007 or early 2008. Since its inception, it has undergone continuous active development and maintenance, consistently adding new features, improving usability, and enhancing its integration with Git. Its development has focused on providing a powerful, intuitive, and cross-platform Git GUI that seamlessly complements the command-line Git tools, earning it a reputation as a reliable choice for developers who prefer a graphical interface for their Git workflows.

SEE ALSO

git(1), git-gui(1), gitk(1), git-add(1), git-commit(1)

Copied to clipboard