GIT-COLA(1)
π NAME π
git-cola β the highly caffeinated Git GUI, bestie. That's it, that's the name, it's iconic.
β¨ SYNOPSIS β¨
git cola [options] [sub-command]
π DESCRIPTION π
Git Cola is a sleek and powerful Git GUI. That's the whole pitch. Sleek. Powerful. GUI. Slay. π
π OPTIONS π
--amendβ kicks offgit colastraight into amend mode πΈ--promptβ makes it ask you which Git repository you want. Defaults to the current directory if you just let it do its thing π-r,--repo <path>β opens up the Git repository sitting at<path>. Defaults to the current directory π¦-s,--status-filter <filter>β applies the path filter to the status widget, so the status widget shows you exactly what you asked for and nothing else β¨--versionβ prints thegit colaversion and then dips out. Exit, stage left π-h,--helpβ shows usage and the optional arguments β--help-commandsβ shows you all the available sub-commands π
π§ SUB-COMMANDS π§
Run git cola --help-commands to see the full list of every single sub-command. That's the cheat sheet, no cap.
These ones below can be launched directly from the command-line. So like, git cola diff will literally launch the diff sub-command. Fr fr.
amβ applies patches. This one is named after thegit amcommand.git cola amis the entry point for the File > Patches > Apply Patches... main menu action π©Ήarchiveβ exports tarballs from Git.git cola archiveis the entry point for the File > Save As Tarball/Zip... main menu action π¦branchβ creates branches.git cola branchis the entry point for the Branch > Create... main menu action πΏbrowseβ browses tracked files.git cola browseis the entry point for the View > File Browser... main menu action πconfigβ configures settings.git cola configis the entry point for the File > Preferences main menu action βοΈdagβ starts thegit dagGit history browser.git cola dagis the entry point for the View > DAG... main menu action, and it can also be launched as thegit dagcommand π³diffβ diffs changed files.git cola diffis the entry point for the Diff > Expression... main menu action π₯fetchβ fetches history from remote repositories.git cola fetchis the entry point for the Actions > Fetch... main menu action π«grepβ usesgit grepto search for content.git cola grepis the entry point for the Actions > Grep main menu action πmergeβ merges branches.git cola mergeis the entry point for the Actions > Merge... main menu action π€openβ launches the "Quick Open" dialog so you can open bookmarked and recently-opened repositories πpullβ fetches and merges remote branches.git cola pullis the entry point for the Actions > Pull... main menu action β¬οΈpushβ pushes branches to remotes.git cola pushis the entry point for the Actions > Push... main menu action β¬οΈrebaseβ starts an interactive rebase.git cola rebaseis the entry point for the Rebase > Start Interactive Rebase... main menu action πremoteβ creates and edits remotes.git cola remoteis the entry point for the File > Edit Remotes... main menu action πsearchβ searches for commits.git cola searchis the entry point for the Actions > Search... main menu action π΅οΈstashβ stashes uncommitted modifications.git cola stashis the entry point for the Actions > Stash... main menu action ποΈtagβ creates tags.git cola tagis the entry point for the Actions > Create Tag... main menu action π·οΈversionβ prints the Git Cola version.git cola versionhas options for printing the current version in different formats. You can also find version details about Git Cola and its dependencies in the Help > About dialog's Version tab π
πΈ CONFIGURE YOUR EDITOR πΈ
The editor that Ctrl+e uses? Yeah, that's configured from the Preferences screen. Easy.
But when nothing is configured, these environment variables get consulted. And if they're defined, the first one of these is the one that wins:
GIT_VISUALVISUALGIT_EDITOREDITOR
The *VISUAL variables get consulted before the *EDITOR variables, and that's on purpose β it means you can set up a graphical editor completely independently from the editor that the Git CLI uses. Best of both worlds, honestly. π«Ά
Pro Tip: configuring your editor togvim -f -pwill open multiple tabs when you're editing files. Andgvim -f -ouses splits. Pick your fighter π
git cola is {vim, emacs, textpad, notepad++}-aware. So when you select a line in the diff or grep screens and press any of Enter, Ctrl+e, or the Edit button, you get taken to that exact line. Not approximately. Exactly. π₯
The editor preference is saved in the gui.editor variable using git config (https://git-scm.com/docs/git-config).
Here's some recommended editor configurations, go off:
- Neovim + Neovim-Qt
git config --global core.editor nvim
git config --global gui.editor 'nvim-qt --nofork'
- Vim + gvim
git config --global core.editor vim
git config --global gui.editor 'gvim -f'
- Sublime Text
git config --global gui.editor 'subl --wait'
β KEYBOARD SHORTCUTS β
git cola has so many useful keyboard shortcuts. Your hands never have to leave the keys, it's giving efficiency π«
A bunch of git cola's editors understand vim-style hotkeys, e.g. {h,j,k,l} for navigating around in the diff, status, grep, and file browser widgets. Iykyk.
{d,u} move down/up one half page at a time, which is basically vim's ctrl-{d,u}. And the space and shift-space hotkeys are mapped to those exact same operations, cute.
Shift-{j,k,d,u,f,b,page-up,page-down,left,right,up,down} can be used in the diff editor to select lines while you're navigating. Selection + movement, together at last π
<s> is a genuinely useful hotkey in the diff editor. It stages/unstages the current selection when there's a selection present. And when nothing is selected, the diff hunk at the current text cursor position is what gets staged. Which means it's very easy to review changes by selecting the good hunks with <s> while navigating down and just skipping over the hunks you're not gonna stage. Chef's kiss π
Ctrl+u in the diff editor reverts unstaged edits, and it respects the selection. Super useful for selectively reverting edits from the worktree. The same hotkey reverts the entire file when you use it from the status tool π
Ctrl+s in the diff editor and the status tools stages/unstages the entire file. Boom. Done. β¨
Wanna see every available shortcut? Press the ? key, or choose Help > Keyboard shortcuts from the main menu, or go consult the git cola keyboard shortcuts reference (https://git-cola.github.io/share/doc/git-cola/hotkeys.html). All roads lead to shortcuts π
π TOOLS π
The git cola interface is made up of a bunch of cooperating tools. Double-clicking a tool opens it in its own subwindow. Dragging it around moves it and places it wherever you want inside the main window. Main character energy, truly.
You can hide tools and rearrange them however you like, and git cola carefully remembers your whole window layout and restores it the next time it launches. It remembers. It cares. π₯Ί
The Control-{1, 2, 3, ...} hotkey gives focus to a specific tool. And if a tool is hidden, you can re-open it using the Tools menu or with the Shift+Control-{1, 2, 3, ...} shortcut keys π¦
The Diff editor gets focused with Ctrl+j. The Status tool gets focused with Ctrl+k. And the Commit tool gets focused with Ctrl+l. Three keys, three tools, zero mouse π
π STATUS π
The Status tool is the visual analog to the git status command (https://git-scm.com/docs/git-status). Same energy, prettier face.
Status shows you:
- files that are modified relative to the staging area
- files staged for the next commit
- unmerged files from an in-progress merge
- files that are untracked to git
These are the same categories you see when you run git status (https://git-scm.com/docs/git-status) on the command line. Literally the same, just β¨visualizedβ¨.
You can navigate through the list of files using keyboard arrows, or with the ergonomic and vim-like <j> and <k> shortcut keys. Both? Both. π
And there are several convenient ways to interact with files in the Status tool:
- selecting a file displays its diff in the Diff viewer. Double-clicking a file stages its contents β and so does the Ctrl+s shortcut key.
- Ctrl+e opens selected files in the configured editor.
- Ctrl+d opens selected files using
git difftool(https://git-scm.com/docs/git-difftool).
There's also a right-click context menu for additional actions. Right-click never fails you πΈ
π Drag and Drop π
Files can be dragged from the Status tool onto other applications. Very cute, very useful.
But listen β some terminals will treat a drag with multiple files by separating them with newlines, which is way less amenable for pasting command-line arguments. Annoying!
To dodge that whole issue, hold down Alt / Option when you're dragging from the Status tool. The drag and drop payload will no longer contain local file URLs β it'll contain plain text that's actually amenable for use on a command-line. Problem solved, periodt π«
Note: if drag and drop is not working and you're on Wayland, you may need to export QT_QPA_PLATFORM=wayland in your environment. That's the fix, you're welcome π«Ά
π Actions π
- Clicking the Staged folder shows a diffstat for the index.
- Clicking the Modified folder shows a diffstat for the worktree.
- Clicking individual files sends diffs to the Diff Display.
- Double-clicking individual files adds and removes their content from the index. (Yes, it does both. It's versatile like that.)
- Various actions are available through the right-click context menu, and different actions show up depending on a file's status. Context-aware, iconic.
π Stage Selected π
Adds to the staging area using git add (https://git-scm.com/docs/git-add). It also marks unmerged files as resolved. Two for one π
π Launch Editor π
Launches the configured visual text editor. Go write your little heart out βοΈ
π Launch Difftool π
Visualizes changes using git difftool.
π Revert Unstaged Edits π
Reverts unstaged content by checking out selected paths from the index/staging area. β οΈ Careful, bestie.
π Revert Uncommitted Edits π
Throws away uncommitted edits. Straight up throws them away. No undo button on that one, so make sure you mean it π
π Unstage Selected π
Removes from the index/staging area with git reset (https://git-scm.com/docs/git-reset). Undo the stage, keep the vibes πΈ
π Launch Merge Tool π
Resolves conflicts using git mergetool (https://git-scm.com/docs/git-mergetool). Conflict, meet solution π€
π Delete File(s) π
Deletes untracked files from the filesystem. Gone gone ποΈ
π Add to .gitignore π
Adds untracked files to the .gitignore file. So git pretends it never saw them π»
π DIFF π
Okay so the diff viewer/editor is where you literally see your changes, and ngl it's beautiful. It displays diffs for the selected files. Additions come through in green, removals show up in light red, and extraneous whitespace gets put on blast with a pure-red background. No hiding, bestie. β¨
Right-clicking inside the diff gives you access to extra actions, and those actions work off either your cursor location or whatever text you've got selected. π±οΈ
The "Copy Diff" action lives at Alt + Shift + C and copies the selected lines straight to your clipboard. And when you copy with "Copy Diff", the +, - and space diff line prefixes get stripped off each line. So clean. π§Ό
π¦ Staging content for commit π¦
The @@ patterns mean a brand-new diff hunk. If you select some lines of diff and use the Stage Selected Lines command, it stages only those selected lines. If you click inside a diff hunk and pick Stage Diff Hunk, it stages the entire patch diff hunk. Iconic. π―
And the corresponding opposite commands work on staged files too β like, staged content can be selectively removed from the index while you're viewing diffs for staged content. π«Ά
π Diff Against Commit (Diff Mode) π
Diff Mode is the moment where you can selectively unstage and revert edits from arbitrary commits, so you can bring those edits back into your worktree. Main character energy, honestly.
You use the diff editor to unstage edits against arbitrary commits via the Diff > Against Commit... (Diff Mode) menu action. π¦
To exit Diff Mode you've got three (3) options, pick your fighter:
- Click the red circle-slash icon on the Status widget.
- Use the Diff > Exit Diff mode menu action.
- Click in an empty area in the Status tool.
βοΈ COMMIT MESSAGE EDITOR βοΈ
The commit message editor is exactly what it says on the tin: a simple text widget for entering your commit messages. πΈ
You can navigate between the Subject and Extended description... fields using the keyboard arrow keys. β¬οΈβ¬οΈ
Pressing Enter while you're inside the Subject field jumps you down to the extended description field. No mouse required, slay.
The Options button menu to the left of the subject field is where the additional actions live.
The Ctrl+i keyboard shortcut adds a standard "Signed-off-by: " line, and Ctrl+Enter creates a new commit using the commit message and staged content. π₯
The commit message gets saved to .git/GIT_COLA_MSG when git cola closes, and restored from it on the next startup. On top of that, this file is checked on updates (Ctrl+R) and if it's been modified by any tool and doesn't conflict with manual changes, the commit message will be updated on the next refresh. This feature is genuinely useful β it lets scripts or agents prepare a message for manual review. π€
ποΈ Sign Off ποΈ
The Sign Off button adds a sign-off to the bottom of the commit message:
Signed-off-by: A. U. Thor <a.u.thor@example.com>
Invoking this action is equivalent to passing the -s option to git commit (<https://git-scm.com/docs/git-commit>).
Signing-off on commits is a common practice in projects that use Developer Certificate of Origin (<https://developercertificate.org/>) attestations in their contribution process.
π Commit π
The commit button runs git commit (<https://git-scm.com/docs/git-commit>). The contents of the commit message editor is provided as the commit message. π
Only staged files are included in the commit β this is the same behavior as running git commit on the command-line. Yes, git cola is being strict with you, and it's right.
π Line and Column Display π
The current line and column number is displayed by the editor. E.g. a 5,0 display means the cursor is located at line five, column zero. π
The display changes colors when lines get too long:
- Yellow indicates the safe boundary for sending patches to a mailing list while keeping space for inline reply markers.
- Orange indicates that the line is starting to run a bit long and should break soon.
- Red indicates that the line is running up against the standard 80-column limit for commit messages.
Keeping commit messages less than 76-characters wide is encouraged. git log (<https://git-scm.com/docs/git-log>) is a great tool, but long lines mess up its formatting for everyone else, so please be mindful when writing commit messages. π
β»οΈ Amend Last Commit β»οΈ
Clicking on Amend Last Commit makes git cola amend the previous commit instead of creating a new one. And when you select this option, git cola loads the previous commit message into the commit message editor for you. π
The Status tool will display all of the changes for the amended commit.
π Create Signed Commit π
This tells git commit and git merge to sign commits using GPG.
Using this option is equivalent to passing the --gpg-sign option to git commit (<https://git-scm.com/docs/git-commit>) and git merge (<https://git-scm.com/docs/git-merge>).
This option's default value can be configured using the cola.signcommits configuration variable. βοΈ
π§ Prepare Commit Message π§
The Commit > Prepare Commit Message action, or the Ctrl-Shift-Return keyboard shortcut, runs the cola-prepare-commit-msg hook if it's available in .git/hooks/. This is a git cola-specific hook that takes the same parameters as Git's prepare-commit-msg hook (<https://git-scm.com/book/en/v2/Customizing-Git-Git-Hooks>).
The hook is passed the path to .git/GIT_COLA_MSG as the first argument, and the hook is expected to write an updated commit message to the specified path. After running this action, the commit message editor is updated with the new commit message. β¨
To override the default path to this hook, set the cola.prepareCommitMessageHook git config variable to the path to the hook script. This is useful if you'd like to use a common hook across all repositories. π
ποΈ Set Commit Date ποΈ
The tool menu's "Set Commit Date" action displays a dialog that lets you set the commit time for the next commit. Once enabled, the checkbox next to the menu action will be checked. β
The commit date option is disabled once a commit is performed.
π€ Set Commit Author π€
The tool menu's "Set Commit Author" action displays a dialog that lets you set the commit author for the next commit. Once enabled, the checkbox next to the menu action will be checked. β
This setting persists across commits. Clear the tool menu's checkbox to disable the action.
π³ BRANCHES π³
The Branches tool gives you a visual tree to navigate branches. The tree has three main sections: Local Branches, Remote Branches and Tags. π
Branches are grouped by their name, divided by the character /. For example, in a repo with the following list of branches:
branch/doe
branch/feature/foo
branch/feature/bar
The branches widget will display the following hierarchy:
branch
- doe
+ feature
- bar
- foo
The current branch is decorated with a star icon β. And if the current branch has commits ahead or behind the remote, then an up or down arrow will be displayed alongside a number showing the number of commits.
π¬ Actions π¬
Various actions are available through the right-click context menu. Different actions are available depending on the selected branch's status.
π Checkout
The checkout action runs git checkout [<branchname>] (<https://git-scm.com/docs/git-checkout>).
π« Merge into current branch
The merge action runs git merge --no-commit [<branchname>] (<https://git-scm.com/docs/git-merge>).
β¬οΈ Pull
The pull action runs git pull --no-ff [<remote>] [<branchname>] (<https://git-scm.com/docs/git-pull>).
β¬οΈ Push
The push action runs git push [<remote>] [<branchname>] (<https://git-scm.com/docs/git-push>).
π·οΈ Rename Branch
The rename branch action runs git branch -M [<branchname>] (<https://git-scm.com/docs/git-push>).
π Delete Branch
The delete branch branch action runs git branch -D [<branchname>] (<https://git-scm.com/docs/git-branch>).
π§Ή Delete Remote Branch
The remote branch action runs git push --delete [<remote>] [<branchname>] (<https://git-scm.com/docs/git-push>).
π¨ APPLY PATCHES π¨
Use the File > Apply Patches menu item to begin applying patches.
Dragging and dropping patches onto the git cola interface adds the patches to the list of patches to apply using git am (<https://git-scm.com/docs/git-am>). π―
You can drag either a set of patches or a directory containing patches. Patches can be sorted in the interface, and they are applied in the same order as is listed in the list.
When a directory is dropped, git cola walks the directory tree in search of patches. git cola sorts the list of patches after they've all been found. This lets you control the order in which patches are applied by placing patch sets into alphanumerically-sorted directories. ποΈ so organized, honestly.
π¦ STASH π¦
Use the git cola stash sub-command or the Actions > Stash... menu action to open the Stash tool.
Stashing is a quick way of removing changes from your worktree so that you can restore the changes later. You can learn about the use cases for stashes in the git stash documentation (<https://git-scm.com/docs/git-stash#_description>). π¦
The list on the left displays all of your saved stashes.
Selecting a stash from the list lets you Rename, Apply, Pop, or Drop the content from the selected stash.
The Save button saves uncommitted content from your worktree to a new stash. πΎ
The content to stash is controlled by the Keep Index and Save Index options. By default, all uncommitted changes, including staged content, will be saved to the stash and removed from your working copy.
βοΈ Options βοΈ
- Keep Index: Stash everything that has not been staged. Only content in the Modified state will be saved to the stash. Staged content will not be stashed.
- Save Index: Only stash the content that has been staged. Only content in the Staged state will be saved to the stash. Modified content will not be stashed.
π§ WORKFLOW FAQ π§
- How do I stash some but not all modified files / lines?
There are two ways of stashing a subset of changes.
You can either Stage the content you want to keep un-stashed, or you can Stage the content that you want to stash away. Two paths, same glow-up. β¨
- Method 1: Stage the content that you want to keep.
This method is analogous to the git stash --keep-index option.
- Stage the content that you want to keep using the Diff and Status tools.
- Launch the Stash tool.
- Enable the Keep Index option and Save the stash.
Modified changes will be stashed away. Staged changes will remain in your worktree. π«Ά
- Method 2: Stage the content that you want to stash.
This workflow is unique to Git Cola. There is currently no equivalent Git builtin command for stashing the staging area.
- Stage the content that you want to stash using the Diff and Status tools.
- Launch the Stash tool.
- Enable the Stash Index option and Save the stash.
Staged changes will be stashed away. Modified changes will remain in your worktree. π
β¨ CUSTOM WINDOW SETTINGS β¨
okay bestie, plot twist: git cola literally remembers you π
like, it keeps track of every modification you make to the layout and arrangement of tools inside the git cola interface. Those changes get saved and restored at application shutdown/startup. it's giving "she knows me fr fr" π«Ά
but hmm, what if you don't want that? git cola can be configured to not save custom layouts by disabling the Save Window Settings option in the git cola preferences. your call, no judgment πΈ
you can save your current layout configuration to *.layout files using the View > Layouts > Save Layout menu action β¨
and you can load arbitrary layout files using the View > Layouts > Load Layout menu action. swap vibes whenever, it's iconic π
by default, layouts are saved to the ~/.config/git-cola/layouts directory. Layouts saved to this directory will appear in the View > Layouts menu for quick loading and switching of layouts. lowkey the best feature, iykyk π
π DARK MODE AND WINDOW MANAGER THEMES π
Git Cola contains a default theme which follows the current Qt style and a handful of built-in color themes. See cola.theme for more details π
to use icons appropriate for a dark application theme, configure git config --global cola.icontheme dark to use the dark icon theme. See cola.icontheme for more details π
on macOS, using the default theme will automatically inherit "Dark Mode" color themes when configured via System Preferences. You will need to configure the dark icon theme as noted above when dark mode is enabled. she just knows β¨
on Linux, you may want Qt to follow the Window manager theme by configuring it to do so using the qt5ct Qt5 configuration tool. Install qt5ct on Debian/Ubuntu systems to make this work.: π
sudo apt install qt5ct
once installed, update your ~/.bash_profile to activate qt5ct:
# Use the style configured using the qt5ct tool
export QT_QPA_PLATFORMTHEME=qt5ct
β οΈ this only work with the default theme. The other themes replace the color palette with theme-specific colors. so like, don't come for the other themes, they're doing their own thing π
some systems may require that you override QT_STYLE_OVERRIDE in order to use a dark theme or to better interact with the Desktop environment. Some systems provide a theme that you can install:
sudo apt-get install adwaita-qt
you can activate the theme using the following environment variable:
# Override the default theme to adwaita-dark
export QT_STYLE_OVERRIDE=adwaita-dark
QT_STYLE_OVERRIDE may already be set in your Desktop Environment, so check that variable for reference if you get unexpected hangs when launching git-cola or when the default theme does not follow the desktop's theme on Linux. fr fr, check it π
if you don't want to set this variable globally then you can set it when launching cola from the command-line:
QT_STYLE_OVERRIDE=adwaita-dark git cola
the following is a user-contributed custom git-cola.desktop file that can be used to launch Git Cola with these settings preset for you π«Ά:
[Desktop Entry]
Name=Git Cola (dark)
Comment=The highly caffeinated Git GUI
TryExec=git-cola
Exec=env QT_STYLE_OVERRIDE=adwaita-dark git-cola --prompt --icon-theme dark
Icon=git-cola
StartupNotify=true
Terminal=false
Type=Application
Categories=Development;RevisionControl;
X-KDE-SubstituteUID=false
you may also want to customize the diff colors when using a dark theme π:
git config --global cola.color.add 86c19f
git config --global cola.color.remove c07067
Please see #760 β https://github.com/git-cola/git-cola/issues/760 β for more details. go read it, it's lore π
π¦ Custom Themes π¦
to create your own custom theme for Git Cola just create a QSS file and put it in ~/.config/themes/. You can add as many files as you want. Each file will become an option in Menu > File > Preferences > Appearance > GUI theme. not me about to make 12 of these ππ
some examples can be found here Qt Style Sheets Examples β https://doc.qt.io/qt-5/stylesheet-examples.html.
βοΈ CONFIGURATION VARIABLES βοΈ
these variables can be set using git config or from the settings. pick your fighter π
π cola.aspell.enabled
Set to true to enable support for aspell spellcheck dictionaries. When false, spellcheck dictionaries are read from /usr/share/dict/words by default. When true Git Cola will run aspell dump master --lang=$lang for each of the installed languages to gather words. Defaults to false.
π cola.aspell.lang
Configure the language names that are queried using aspell. For example, git config --global --add cola.aspell.lang en_US will make it so that only the en_US language is used.
this is a multi-valued configuration value. git config --global --add cola.aspell.lang $lang can be run once for each language to specify multiple languages to use.
when unset, all of the two-letter language names from the output of aspell dicts will be used. slay π
π cola.autodetectproxy
Set to false to disable auto-configuration of HTTP proxy settings based on the configured Gnome and KDE Desktop Environment proxy settings. The core Git http.proxy configuration overrides this value. Defaults to true.
π cola.autocompletepaths
Set to false to disable auto-completion of filenames in completion widgets. This can speed up operations when working in large repositories. Defaults to true. (big repos besties, this one's for u π₯)
π cola.autoloadCommitTemplate
Set to true to automatically load the commit template in the commit message editor If the commit.template variable has not been configured, raise the corresponding error. Defaults to false. π€
π cola.blameviewer
The command used to blame files. Defaults to git gui blame. go blame someone, it's self care π
π cola.blockcursor
Whether to use a "block" cursor in diff editors. The block cursor is easier to see compared to a line cursor. Set to false to use a thin "line" cursor. Defaults to true. π
π cola.boldfonts
Use bold fonts throughout the entire interface to increase usability on small screens. Defaults to false.
π cola.boldheaders
Whether to use bold headers on a dark background instead of italics in the Status tool. Defaults to false.
π cola.browserdockable
Whether to create a dock widget with the Browser tool. Defaults to false to speedup startup time. fast startup = main character energy β¨
π cola.checkconflicts
Inspect unmerged files for conflict markers before staging them. This feature helps prevent accidental staging of unresolved merge conflicts. Defaults to true. it's looking out for you fr π«Ά
π cola.defaultrepo
git cola, when run outside of a Git repository, prompts the user for a repository. Set cola.defaultrepo to the path of a Git repository to make git cola attempt to use that repository before falling back to prompting the user for a repository.
π cola.dictionary
Specifies additional dictionaries for git cola to use in its spell checker. This should be configured to the path of a newline-separated list of words. *.dic dictionary files used by hunspell are also supported.
by default, git cola searches for dict/words and dict/propernames dictionary files in ~/.local/share and $XDG_DATA_DIRS.
if $XDG_DATA_DIRS is undefined or set to an empty value then /usr/local/share and /usr/share are searched for dictionary files.
dictionary files are newline-separated and contain one word per line. Dictionary files must be UTF-8 encoded. π
if you have multiple dictionaries that you would like git cola to use then you can specify multiple dictionaries using git config --global --add. cola.dictionary is a configuration value that can contain multiple values.
git config --global --add cola.dictionary /path/to/dictionary1
git config --global --add cola.dictionary /path/to/dictionary2
users on Debian-based systems can install additional hunspell dictionary files to make them available in /usr/share/hunspell/*.dic. For example, to install the Spanish dictionary, run:
sudo apt install hunspell-es
π cola.enablepopups
Actions such as "Fetch", "Push", "Pull", "Sync" and "Sync Out" display desktop notifications on Linux when either the notify2 or notifypy modules are installed. The message are logged to the Console otherwise.
messages are displayed using popup dialogs when cola.enablepopups is set to true. Defaults to false.
π cola.expandtab
Expand tabs into spaces in the commit message editor. When set to true, git cola will insert a configurable number of spaces when Tab is pressed. The number of spaces is determined by cola.tabwidth. Defaults to false. no more chaotic indentation bestie π
π cola.gravatar
Use the gravatar.com service to lookup icons for author emails. Gravatar icons work by sending an MD5 hash of an author's email to gravatar.com when requesting an icon. Warning: this feature can leak information. Network requests to gravatar.com are disabled when set to false. Defaults to true.
β οΈ okay so like, for real, this one leaks info. dramatic but true, she said what she said π
π cola.fileattributes
Enables per-file gitattributes encoding and binary file support. This tells git cola to honor the configured encoding when displaying and applying diffs.
a .gitattributes file can set the binary attribute in order to force specific untracked paths to be treated as binary files when diffing. Binary files are displayed using a hex-dump display.
# Treat *.exr files as binary files.
*.exr binary
π cola.fixupcommitcount
The number of commits to display in the "Fixup Previous Commit" menu in the commit message editor. Defaults to 10.
π cola.fontdiff
Specifies the font to use for git cola's diff display. aesthetic β¨
π cola.fontsize
Specifies the font size that is used for the Status, Submodules, Branches, Recent, and Favorites widgets.
π cola.hidpi
Specifies the High DPI displays scale factor. Set 0 to automatically scaled. Setting value between 0 and 1 is undefined. This option requires at least Qt 5.6 to work. See Qt QT_SCALE_FACTOR documentation β https://doc.qt.io/qt-5/highdpi.html β for more information.
π cola.icontheme
Specifies the icon themes to use throughout git cola. The theme specified must be the name of the subdirectory containing the icons, which in turn must be placed in the inside the main "icons" directory in git cola's installation prefix.
if unset, or set either "light" or "default", then the default style will be used. If set to "dark" then the built-in "dark" icon theme, which is suitable for a dark window manager theme, will be used. π
if set to an absolute directory path then icons in that directory will be used. This value can be set to multiple values using, git config --add cola.icontheme $theme.
this setting can be overridden by the GIT_COLA_ICON_THEME environment variable, which can specify multiple themes using a colon-separated value.
the icon theme can also be specified by passing --icon-theme=<theme> on the command line, once for each icon theme, in the order that they should be searched. This can be used to override a subset of the icons, and fallback to the built-in icons for the remainder. mix and match, it's giving curated π
π cola.imagediff.[extension]
Enable image diffs for the specified file extension. For example, configuring git config --global cola.imagediff.svg false will disable use of the visual image diff for .svg files in all repos until is is explicitly toggled on. Defaults to true. πβ¨
cola.inotifyβ wanna turn OFF file system change monitoring? set this tofalse. it defaults totrue, but bestie listen: it also needs either Linux with inotify support or Windows withpywin32installed for the monitoring to actually do anything π«Άcola.inotifydelayβ how long to wait, in milliseconds, between file system change notifications. defaults to888β¨cola.refreshonfocusβ set totrueand git cola auto-refreshes the moment it gains focus. defaults tofalse, because lowkey it can cause a lil pause every time you switch to git cola from another app πcola.linebreakβ whether to automatically break long lines while editing commit messages. defaults totrue. you configure this one in the Preferences dialog, but you can also toggle it for one-off usage via the commit message editor's options sub-menu πcola.loadcommitmsgcountβ how many commits show up in the "Load Previous Commit Message" menu inside the commit message editor. defaults to10πcola.logdateβ sets the default date-time mode for the DAG display. this value gets passed straight togit log --date=<format>. peepgit log(1)for more deets πΈcola.maxrecentβ git cola caps how many recent repos it remembers so your start and recent repositories menu doesn't get cluttered. the max is controlled bycola.maxrecentand defaults to8πcola.mousezoomβ controls whether zooming text with Ctrl + MouseWheel scroll is enabled. set tofalseto disable scrolling with the mouse wheel. defaults totrueπ±οΈcola.notifyonpushβ enables desktop notifications when commits get pushed using the "Push" dialog. set totrueto turn those notifications on. defaults tofalseπcola.dragencodingβ when git cola adds paths dragged from its widgets into the drag-and-drop mime data (specifically thetext/x-moz-urlentry), it encodes them intoutf-16. whyutf-16? so gnome-terminal sees the right paths β but other terminals might expect a different encoding. if you're on a terminal that expects a modern encoding, e.g. terminator, then set this value toutf-8π¦cola.readsizeβ git cola avoids reading large binary untracked files. the max size to read is controlled bycola.readsizeand defaults to2048πcola.resizebrowsercolumnsβ set this totrueand git cola will automatically resize the file browser columns as folders get expanded/collapsed. defaults tofalseποΈcola.patchesdirectoryβ the default directory to use when exporting patches. relative paths are treated as relative to the current repository. absolute paths are used as-is. defaults topatchesπ¦cola.safemodeβ okay so the "Stage" button in the git cola Actions panel stages ALL files when it's activated and no files are selected. that's a problem if you accidentally trigger it after carefully preparing the index with staged changes π± "Safe Mode" is enabled by settingcola.safemodetotrue. when enabled, git cola will do NOTHING when "Stage" is activated without a selection. defaults tofalseπ‘οΈcola.savewindowsettingsβ git cola will remember its window settings when set totrue. window settings and X11 sessions are saved in$HOME/.config/git-colaπΎcola.showpathβ git cola displays the absolute path of the repository in the window title. you can disable that by settingcola.showpathtofalse. defaults totrueπͺcola.signcommitsβ git cola will sign commits by default when settrue. defaults tofalse. see the section below on setting up GPG for more deets βοΈcola.startupmodeβ controls how the list of repositories is displayed in the startup dialog. set it tolistto view repos as a list, orfolderto view them as a collection of folder icons. defaults tolistποΈcola.statusindentβ set totrueto indent files in the Status widget. files in the Staged, Modified, etc. categories get grouped in a tree-like structure. defaults tofalseπ³cola.statusshowtotalsβ set totrueto display file counts in the Status widget's category titles. defaults tofalseπ’cola.syncβ set tofalseto disable callingos.fdatasync()/os.fdata()when saving settings. defaults totrue, which means those functions get called when windows are closed and their settings are saved π«cola.tabwidthβ the number of columns occupied by a tab character. defaults to8πcola.terminalβ the command to use when launching commands within a graphical terminal.
cola.terminal defaults to xterm -e when unset. e.g. when opening a shell, git cola will run xterm -e $SHELL.
git cola has built-in support for xterm, gnome-terminal, konsole. if either gnome-terminal, xfce4-terminal, or konsole are installed then they will be preferred over xterm when cola.terminal is unset.
the table below shows the built-in values that are used for the respective terminal. you can force the use of a specific terminal by configuring cola accordingly.
cola.terminalshellquoteβ some terminals require that the command string get passed as a string. for example,xfce4-terminal -e "git difftool"requires shell quoting, whereasgnome-terminal -- git difftooldoes not.
you should not need to set this variable for the built-in terminals cola knows about β it will behave correctly without configuration. for example, when not configured, cola already knows that xfce4-terminal requires shell quoting.
this configuration variable is for custom terminals outside of the builtin set. the table below shows the builtin configuration.
here's that builtin terminal lineup, bestie π
gnome-terminalβcola.terminalis"gnome-terminal --",cola.terminalshellquoteisfalsekonsoleβcola.terminalis"konsole -e",cola.terminalshellquoteisfalsexfce4-terminalβcola.terminalis"xfce4-terminal -e",cola.terminalshellquoteistruextermβcola.terminalis"xterm -e",cola.terminalshellquoteisfalsecola.textwidthβ the number of columns used for line wrapping. tabs are counted according tocola.tabwidthπcola.themeβ specifies the GUI theme to use throughout git cola. the theme you pick must be one of these values:defaultβ default Qt theme, may appear different on various systemsflat-dark-blueflat-dark-greenflat-dark-greyflat-dark-redflat-light-blueflat-light-greenflat-light-greyflat-light-red
example time β¨:
git config --global cola.theme flat-dark-blue
if unset, or set to an invalid value, then the default style gets used. the default theme is generated by Qt's internal engine and should look native but may look noticeably different on different platforms. the flat themes, on the other hand, should look similar (but not identical) on various systems.
you can also specify the GUI theme by passing --theme=<name> on the command line π¨
cola.turboβ set totrueto enable "turbo" mode ποΈ "Turbo" mode disables some features that can slow things down when operating on huge repositories. "Turbo" mode will skip loading Git commit messages, author details, status information, and commit date details in the File Browser tool. defaults tofalseπ₯cola.color.textβ the default diff text color, in hexadecimal#RRGGBBnotation. defaults to"#030303":
git config cola.color.text '#030303'
cola.color.addβ the default diff "add" background color, in hexadecimal#RRGGBBnotation. defaults to"#d2ffe4":
git config cola.color.add '#d2ffe4'
cola.color.removeβ the default diff "remove" background color, in hexadecimal#RRGGBBnotation. defaults to"#fee0e4":
git config cola.color.remove '#fee0e4'
cola.color.headerβ the default diff header text color, in hexadecimal#RRGGBBnotation. defaults to"#bbbbbb":
git config cola.color.header '#bbbbbb'
cola.updateindexβ Git's index is refreshed during application startup. you can disable this behavior by configuringcola.updateindextofalse. this is useful in some scenarios, like when accessing Git repositories over a Samba share. if you have this enabled then you can use the ctrl-r "Refresh" action to force the index to be refreshed instead. defaults totrueπcola.verbosityβ cranks up the verbosity of the Console tool by logging git commands with a[git]prefix when set to a value of1or higher. this lets users more easily discover which git commands are being run under the hood π defaults to0π¬commit.cleanupβ configure whether commit messages should be stripped of whitespace and comments.
valid values are strip, whitespace, verbatim, scissors or default.
the default mode uses the whitespace mode when committing through Git Cola and the strip mode when committing using the git commit command-line.
strip- Strip leading and trailing empty lines, trailing whitespace, commentary and collapse consecutive empty lines.whitespace- Same asstripexcept#commentary is not removed. this is the default behavior when committing through Git Cola.verbatim- Do not change the message at all.scissors- Same aswhitespaceexcept that everything from (and including) the line found below is truncated, if the message is to be edited."#"can be customized withcore.commentChar:
# ------------------------ >8 ------------------------
Scissor-lines and all following lines are removed.
changing the mode to whitespace can be useful when you always want to keep lines that begin with comment character # in your log message, even when committing using the command-line git commit.
on the contrary, if you always want to always strip comments, even when committing through Git Cola, then configure commit.cleanup to strip.
peep the git commit cleanup mode documentation for more details βοΈ
core.commentCharβ commit messages can contain comments that start with this character. defaults to#.
see the git config documentation for more details π¬
core.hooksPathβ Hooks are programs you can place in a hooks directory to trigger actions at certain points in git's execution. Hooks that don't have the executable bit set are ignored.
by default the hooks directory is $GIT_DIR/hooks, but that can be changed via the core.hooksPath configuration variable.
the cola-prepare-commit-msg hook functionality and Cola's Git LFS detection honors this configuration.
check the git hooks documentation for more details πͺ
gui.diffcontextβ the number of diff context lines to display πgui.displayuntrackedβ git cola avoids showing untracked files when set tofalseπgui.editorβ this is where you tell git cola which text editor you wanna live in. It overrides theVISUALenvironment variable (yeah, it's that girl, she wins). Defaults togvim -f -p.gui.historybrowserβ the browser used for visualizing history. Defaults togitk. π°οΈdiff.toolβ the default diff tool. That's it, that's the whole thing.merge.toolβ the default merge tool. Same energy, different job.user.emailβ the email address that gets baked into every newly created commit. Can be overridden by theGIT_AUTHOR_EMAIL,GIT_COMMITTER_EMAIL, andEMAILenvironment variables. πuser.nameβ your full name, recorded in any newly created commits. Can be overridden by theGIT_AUTHOR_NAMEandGIT_COMMITTER_NAMEenvironment variables. Your name, but make it β¨commitsβ¨.
π ENVIRONMENT VARIABLES π
GIT_ASKPASSβ tells OpenSSH which askpass program to hit up when it needs credentials. This env var has the highest priority when you're specifying an askpass program.
The SSH_ASKPASS environment variable is considered alongside GIT_ASKPASS and has the 2nd-highest priority.
Peep Git's askpass documentation for more: https://git-scm.com/docs/gitcredentials.html#_requesting_credentials
Debian besties can either sudo apt install ssh-askpass-gnome or sudo apt install ksshaskpass to install a suitable askpass credential helper. Once installed, those programs get used by default when the environment variables haven't been set.
If no askpass program can be found, cola's builtin ssh-askpass program will be used β but using an external program is highly encouraged. π«Ά
GIT_COLA_ICON_THEMEβ when you set this in the environment, it overrides whatever theme is specified in thecola.iconthemeconfig. Readcola.iconthemefor more deets. πGIT_COLA_SCALEβ okay so, important:
GIT_COLA_SCALE should not be used with newer versions of Qt.
Set QT_AUTO_SCREEN_SCALE_FACTOR to 1 and Qt will automatically scale the interface to the correct size based on the display DPI. This option is also available by setting the cola.hidpi config.
See the Qt High DPI documentation for more: https://doc.qt.io/qt-5/highdpi.html
Now the actual vibe: git cola can be made to scale its interface for HiDPI displays. When defined, git cola will scale icons, radio buttons, and checkboxes according to the scale factor. The default value is 1. A good value is 2 for high-resolution displays.
Fonts are not scaled, because their size can already be set in the settings. Periodt. π
GIT_COLA_TRACEβ when defined, git cola logs git commands to stdout. When set tofull, git cola also logs the exit status and output. When set totrace, git cola logs to the Console widget. Full detective mode. πVISUALβ specifies the default editor to use. This gets ignored when thegui.editorconfiguration variable is defined. Sorry babe,gui.editorate. π
π¦ LANGUAGE SETTINGS π¦
git cola automatically detects your language and presents some translations when available. Maybe you don't want that, or maybe you want git cola speaking one specific language on purpose.
You can make git cola use an alternative language by creating a ~/.config/git-cola/language file containing the standard two-letter gettext language code, e.g. "en", "de", "ja", "zh", etc.:
mkdir -p ~/.config/git-cola &&
echo en >~/.config/git-cola/language
Alternatively you may also use the LANGUAGE environmental variable to temporarily change git cola's language just like any other gettext-based program. For example, to temporarily change git cola's language to English:
LANGUAGE=en git cola
To make git cola use the zh_TW translation with zh_HK, zh, and en as a fallback:
LANGUAGE=zh_TW:zh_HK:zh:en git cola
β¨ CUSTOM GUI ACTIONS β¨
git cola lets you define custom GUI actions by setting git config variables. The "name" of the command appears in the "Actions" menu. Your own little menu era. π
guitool.<name>.cmd
Specifies the shell command line to execute when the corresponding item of the Tools menu is invoked. This option is mandatory for every tool. The command is executed from the root of the working directory, and in the environment it receives:
- the name of the tool as
GIT_GUITOOL - the name of the currently selected file as
FILENAME - the name of the current branch as
CUR_BRANCH(if the head is detached,CUR_BRANCHis empty)
If <name> contains slashes (/) then the leading part of the name, up until the final slash, is treated like a path of sub-menus under which the actions will be created.
For example, configuring guitool.Commands/Util/echo.cmd creates a Commands menu inside the top-level Actions menu, a Util menu inside the Commands menu and an echo action inside the Commands sub-menu. Menus within menus, inception style. πΈ
guitool.<name>.background
Run the command in the background (similar to editing and difftool actions). This avoids blocking the GUI. Setting background to true implies noconsole and norescan. Lowkey the multitasking icon. π₯
guitool.<name>.needsfile
Run the tool only if a diff is selected in the GUI. It guarantees that FILENAME is not empty.
guitool.<name>.noconsole
Run the command silently, without creating a window to display its output. Shy and mysterious. π
guitool.<name>.norescan
Don't rescan the working directory for changes after the tool finishes execution.
guitool.<name>.confirm
Show a confirmation dialog before actually running the tool. Consent first bestie. β
guitool.<name>.argprompt
Request a string argument from the user, and pass it to the tool through the ARGS environment variable. Since requesting an argument implies confirmation, the confirm option has no effect if this is enabled. If the option is set to true, yes, or 1, the dialog uses a built-in generic prompt; otherwise the exact value of the variable is used.
guitool.<name>.revprompt
Request a single valid revision from the user, and set the REVISION environment variable. In other aspects this option is similar to argprompt, and can be used together with it.
guitool.<name>.revunmerged
Show only unmerged branches in the revprompt sub-dialog. This is useful for tools similar to merge or rebase, but not for things like checkout or reset.
guitool.<name>.title
Specifies the title to use for the prompt dialog. Defaults to the tool name.
guitool.<name>.prompt
Specifies the general prompt string to display at the top of the dialog, before subsections for argprompt and revprompt. The default value includes the actual command.
guitool.<name>.shortcut
Specifies a keyboard shortcut for the custom tool.
The value must be a valid string understood by the QAction::setShortcut() API. See https://doc.qt.io/qt-6/qkeysequence.html#toString for more details about the supported values.
Avoid creating shortcuts that conflict with existing built-in git cola shortcuts. Creating a conflict will result in no action when the shortcut is used. π
π SETTING UP CREDENTIAL HELPERS π
Git has robust support for automatically handling credentials.
The recommended approach is to use SSH keys and an SSH agent, but any of the core Git Credentials helpers will get used automatically by Git Cola.
See https://git-scm.com/doc/credential-helpers for more details.
π§ SETTING UP GPG FOR SIGNED COMMITS π§
When creating signed commits, gpg will attempt to read your password from the terminal from which git cola was launched. The way to make this work smoothly is to use a GPG agent so that you can avoid needing to re-enter your password every time you commit. Hello? Privacy AND convenience?
This also gets you a graphical passphrase prompt instead of getting prompted for your password in the terminal. Glow up fr. β¨
π οΈ Install gpg-agent and friends
On Mac OS X, you may need to brew install gpg-agent and install the Mac GPG Suite: https://gpgtools.org/macgpg2/
On Linux use your package manager to install gnupg2, gnupg-agent and pinentry-qt, e.g.:
sudo apt-get install gnupg2 gnupg-agent pinentry-qt
On Linux, you should also configure Git so that it uses gpg2 (gnupg2), otherwise you will get errors mentioning, "unable to open /dev/tty". Set Git's gpg.program to gpg2:
git config --global gpg.program gpg2
π Configure gpg-agent and a pin-entry program
On Mac OS X, edit ~/.gnupg/gpg.conf to include the line,:
use-agent
This is typically not needed on Linux, where gpg2 is used, as this is the default value when using gpg2.
Next, edit ~/.gnupg/gpg-agent.conf to contain a pinentry-program line pointing to the pinentry program for your platform.
The following example ~/.gnupg/gpg-agent.conf shows how to use pinentry-gtk-2 on Linux:
pinentry-program /usr/bin/pinentry-gtk-2
default-cache-ttl 3600
This following example .gnupg/gpg-agent.conf shows how to use MacGPG2's pinentry app on On Mac OS X:
pinentry-program /usr/local/MacGPG2/libexec/pinentry-mac.app/Contents/MacOS/pinentry-mac
default-cache-ttl 3600
enable-ssh-support
use-standard-socket
Once this has been set up then you will need to reload your gpg-agent config:
echo RELOADAGENT | gpg-connect-agent
If you see the following output:
OK
Then the daemon is already running, and you do not need to start it yourself. Slay, it's alive. π
If it is not running, eval the output of gpg-agent --daemon in your shell prior to launching git cola.:
eval $(gpg-agent --daemon)
git cola
β SHELL COMPLETIONS β
Git Cola provides shell completions for zsh and bash. The completion scripts and instructions are included in Git Cola's contrib directory.
- Shell completion scripts β
https://gitlab.com/git-cola/git-cola/-/tree/main/contrib - Setup instructions β
https://gitlab.com/git-cola/git-cola/-/blob/main/contrib/README.md
π MACOS NOTES π
A git-cola.app bundle can be built using garden macos/app. See the garden.yaml file for more details.
Older versions of the git-cola.app may have caused macOS to launch Git Cola using Rosetta even though Python is arm64 native. This is a macOS / Apple bug.
A stub git-cola-macos binary is now provided in git-cola.app/Contents/MacOS as a workaround to prevent this behavior.
If you launched an older version of the git-cola.app bundle you may have encountered this macOS bug:
Per the discussion above, you can clear the buggy cache using this command:
/usr/libexec/PlistBuddy -c 'Delete :"Architectures for arm64":com.justroots.git-cola' \
~/Library/Preferences/com.apple.LaunchServices/com.apple.LaunchServices.plist
Reboot after running this command and Git Cola should launch natively without Rosetta. No cap. π«Ά
πͺ WINDOWS NOTES πͺ
Windows besties, this section is for you and only you β¨ Everybody else can scroll, no shade π
Git Installation π
If Git lives in a custom location β like, not installed in C:/Git or Program Files β then you gotta tell Git Cola where it's at. How? Make a file in your home directory:
~/.config/git-cola/git-bindir
...and that file should point at your git installation. For example, the file contains:
C:/Tools/Git/bin
That's it. That's the whole thing. Point it at your git, bestie π«Ά
SSH Agents for Key-based Authentication π
So, you might need to set up ssh-agent to use SSH key-based authentication on Windows. Real talk: it's been reported that you have to start the OpenSSH agent in Windows Services and add the key using Powershell β both of those, together, are necessary to get things working π
For all the juicy details, peep these links:
Samba π΅βπ«
Core Git has issues when it's operating over a Samba file share. Like, .git/index.lock will just... linger around. Refusing to leave. Haunting the place. And it prevents git commands from working correctly the whole time π«
To dodge all of this drama, operate on repositories from a local filesystem. No Samba, no problems, no leftover lock files being messy π
π FIPS SECURITY MODE π
FIPS Security Mode (over at <https://github.com/python/cpython/issues/53462>) is a thing in newer versions of Python. Which newer versions, you ask? Python 3.9+, plus the patched Python 3.6 that CentOS8/RHEL8 uses (and possibly some others too, oop π).
So here's the tea: Git Cola uses the hashlib.md5 function and it adheres to the FIPS security mode when it's available. But before you panic β Git Cola does not use the MD5 value for security purposes. The MD5 is used only for the purposes of implementing the cola/gravatar.py Gravatar client. That's it. That's the whole job π
Zero security concerns, we promise, periodt.
π LINKS π
Git Cola's Git Repository π
- Primary repository β <https://gitlab.com/git-cola/git-cola/>
- Mirror repository β <https://github.com/git-cola/git-cola/>
Git Cola Homepage π
β¨ Author β¨
David Aguilar and contributors π«Ά
and that's a wrap on the whole manual, bestie!! π This page was GIT-COLA(1), served up from version 4.19.0, dated Jul 18, 2026 πΈ Now go make some commits, you main character ππ
π¦
π¦ where this page comes from
- ubuntu stonking: git-cola 4.19.0-1 Β· GPL-2.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms