7 git cola [options] [sub-command]
11 Git Cola is a sleek and powerful Git GUI.
18 Start `git cola` in amend mode.
22 Prompt for a Git repository. Defaults to the current directory.
26 Open the Git repository at `<path>`. Defaults to the current directory.
28 -s, --status-filter <filter>
29 ----------------------------
30 Apply the path filter to the status widget.
34 Print the `git cola` version and exit.
38 Show usage and optional arguments.
42 Show available sub-commands.
53 Export tarballs from Git.
69 Start the `git dag` Git history browser.
77 Fetch history from remote repositories.
81 Use `git grep` to search for content.
89 Fetch and merge remote branches.
93 Push branches to remotes.
97 Start an interactive rebase.
101 Create and edit remotes.
109 Stash uncommitted modifications.
117 Print the `git cola` version.
119 CONFIGURE YOUR EDITOR
120 =====================
121 The editor used by `Ctrl-e` is configured from the Preferences screen.
123 The following environment variables are consulted when no editor is configured.
124 If defined, the first of these variables is used:
131 The `*VISUAL` variables are consulted before the `*EDITOR` variables so that you can
132 configure a graphical editor independently of the editor used by the Git CLI.
134 *ProTip*: Configuring your editor to `gvim -f -p` will open multiple tabs
135 when editing files. `gvim -f -o` uses splits.
137 `git cola` is {vim, emacs, textpad, notepad++}-aware.
138 When you select a line in the diff or grep screens and press any of
139 `Enter`, `Ctrl-e`, or the `Edit` button, you are taken to that exact line.
141 The editor preference is saved in the `gui.editor` variable using
142 `git config <http://git-scm.com/docs/git-config>`_.
146 `git cola` has many useful keyboard shortcuts.
148 Many of `git cola`'s editors understand vim-style hotkeys, eg. `{h,j,k,l}`
149 for navigating in the diff, status, grep, and file browser widgets.
151 `{d,u}` move down/up one half page at a time (similar to vim's `ctrl-{d,u}`).
152 The `space` and `shift-space` hotkeys are mapped to the same operations.
154 `Shift-{j,k,d,u,f,b,page-up,page-down,left,right,up,down}` can be be used in
155 the diff editor to select lines while navigating.
157 `s` is a useful hotkey in the diff editor. It stages/unstages the current
158 selection when a selection is present. When nothing is selected, the
159 diff hunk at the current text cursor position is staged. This makes it very
160 easy to review changes by selecting good hunks with `s` while navigating down
161 and over hunks that are not going to be staged.
163 `Ctrl-u` in the diff editor reverts unstaged edits, and respects the
164 selection. This is useful for selectively reverted edits from the worktree.
165 This same hotkey reverts the entire file when used from the status tool.
167 `Ctrl-s` in the diff editor and status tools stages/unstages the entire file.
169 You can see the available shortcuts by pressing pressing the ``?`` key,
170 choosing ``Help -> Keyboard shortcuts`` from the main menu,
171 or by consulting the `git cola keyboard shortcuts reference <https://git-cola.github.io/share/doc/git-cola/hotkeys.html>`_.
175 The `git cola` interface is composed of various cooperating tools.
176 Double-clicking a tool opens it in its own subwindow.
177 Dragging it around moves and places it within the main window.
179 Tools can be hidden and rearranged however you like.
180 `git cola` carefully remembers your window layout and restores
181 it the next time it is launched.
183 The `Control-{1, 2, 3, ...}` hotkey gives focus to a specific tool.
184 A hidden tool can be re-opened using the `Tools` menu or
185 the `Shift+Control-{1, 2, 3, ...}` shortcut keys.
187 The Diff editor can be focused with `Ctrl-j`.
188 the Status tool can be focused with `Ctrl-k`.
189 the Commit tool can be focused with `Ctrl-l`.
195 The `Status` tool provides a visual analog to the
196 `git status <http://git-scm.com/docs/git-status>`_ command.
198 `Status` displays files that are `modified` relative to the staging area,
199 `staged` for the next commit, `unmerged` files from an in-progress merge,
200 and files that are `untracked` to git.
202 These are the same categories one sees when running
203 `git status <http://git-scm.com/docs/git-status>`_
206 You can navigate through the list of files using keyboard arrows as well
207 as the ergonomical and vim-like `j` and `k` shortcut keys.
209 There are several convenient ways to interact with files in the `Status` tool.
211 Selecting a file displays its diff in the :ref:`Diff` viewer.
212 Double-clicking a file stages its contents, as does the
213 the `Ctrl-s` shortcut key.
215 `Ctrl-e` opens selected files in the conifgured editor, and
216 `Ctrl-d` opens selected files using `git difftool <http://git-scm.com/docs/git-difftool>`_
218 Additional actions can be performed using the right-click context menu.
222 Clicking the `Staged` folder shows a diffstat for the index.
224 Clicking the `Modified` folder shows a diffstat for the worktree.
226 Clicking individual files sends diffs to the `Diff Display`.
228 Double-clicking individual files adds and removes their content from the index.
230 Various actions are available through the right-click context menu.
231 Different actions are available depending a file's status.
235 Add to the staging area using `git add <http://git-scm.com/docs/git-add>`_
236 Marks unmerged files as resolved.
240 Launches the configured visual text editor
244 Visualize changes using `git difftool`.
246 Revert Unstaged Edits
247 ~~~~~~~~~~~~~~~~~~~~~
248 Reverts unstaged content by checking out selected paths
249 from the index/staging area
251 Revert Uncommitted Edits
252 ~~~~~~~~~~~~~~~~~~~~~~~~
253 Throws away uncommitted edits
257 Remove from the index/staging area with
258 `git reset <http://git-scm.com/docs/git-reset>`_
262 Resolve conflicts using `git mergetool <http://git-scm.com/docs/git-mergetool>`_.
266 Delete untracked files from the filesystem.
270 Adds untracked files to to the .gitignore file.
276 The diff viewer/editor displays diffs for selected files.
277 Additions are shown in green and removals are displayed in light red.
278 Extraneous whitespace is shown with a pure-red background.
280 Right-clicking in the diff provides access to additional actions
281 that use either the cursor location or text selection.
283 Staging content for commit
284 --------------------------
285 The ``@@`` patterns denote a new diff hunk. Selecting lines of diff
286 and using the `Stage Selected Lines` command will stage just the selected
287 lines. Clicking within a diff hunk and selecting `Stage Diff Hunk` stages the
288 entire patch diff hunk.
290 The corresponding opposite commands can be performed on staged files as well,
291 e.g. staged content can be selectively removed from the index when we are
292 viewing diffs for staged content.
294 COMMIT MESSAGE EDITOR
295 =====================
297 The commit message editor is a simple text widget
298 for entering commit messages.
300 You can navigate between the `Subject` and `Extended description...`
301 fields using the keyboard arrow keys.
303 Pressing enter when inside the `Subject` field jumps down to the
304 extended description field.
306 The `Options` button menu to the left of the subject field
307 provides access to the additional actions.
309 The `Ctrl+i` keyboard shortcut adds a standard "Signed-off-by: " line,
310 and `Ctrl+Enter` creates a new commit using the commit message and
315 The `Sign Off` button adds a standard::
317 Signed-off-by: A. U. Thor <a.u.thor@example.com>
319 line to the bottom of the commit message.
321 Invoking this action is equivalent to passing the ``-s`` option
322 to `git commit <http://git-scm.com/docs/git-commit>`_.
326 The commit button runs
327 `git commit <http://git-scm.com/docs/git-commit>`_.
328 The contents of the commit message editor is provided as the commit message.
330 Only staged files are included in the commit -- this is the same behavior
331 as running ``git commit`` on the command-line.
333 Line and Column Display
334 -----------------------
335 The current line and column number is displayed by the editor.
336 E.g. a ``5,0`` display means that the cursor is located at
337 line five, column zero.
339 The display changes colors when lines get too long.
340 Yellow indicates the safe boundary for sending patches to a mailing list
341 while keeping space for inline reply markers.
343 Orange indicates that the line is starting to run a bit long and should
346 Red indicates that the line is running up against the standard
347 80-column limit for commit messages.
349 Keeping commit messages less than 76-characters wide is encouraged.
350 `git log <http://git-scm.com/docs/git-log>`_
351 is a great tool but long lines mess up its formatting for everyone else,
352 so please be mindful when writing commit messages.
357 Clicking on `Amend Last Commit` makes `git cola` amend the previous commit
358 instead of creating a new one. `git cola` loads the previous commit message
359 into the commit message editor when this option is selected.
361 The `Status` tool will display all of the changes for the amended commit.
365 Tell `git commit` and `git merge` to sign commits using GPG.
367 Using this option is equivalent to passing the ``--gpg-sign`` option to
368 `git commit <http://git-scm.com/docs/git-commit>`_ and
369 `git merge <http://git-scm.com/docs/git-merge>`_.
371 This option's default value can be configured using the `cola.signcommits`
372 configuration variable.
374 Prepare Commit Message
375 ----------------------
376 The ``Commit -> Prepare Commit Message`` action or `Ctrl-Shift-Return` keyboard shortcut
377 runs the `cola-prepare-commit-msg` hook if it is available in `.git/hooks/`.
378 This is a `git cola`-specific hook that takes the same parameters
379 as Git's `prepare-commit-msg hook <https://git-scm.com/book/en/v2/Customizing-Git-Git-Hooks>`_
381 The hook is passed the path to `.git/GIT_COLA_MSG` as the first argument and the hook is expected to write
382 an updated commit message to specified path. After running this action, the
383 commit message editor is updated with the new commit message.
385 To override the default path to this hook set the
386 `cola.prepareCommitMessageHook` `git config` variable to the path to the
387 hook script. This is useful if you would like to use a common hook
388 across all repositories.
393 The `Branches` tool provides a visual tree to navigate through the branches.
394 The tree has three main nodes `Local Branch`, `Remote Branch` and `Tags`.
395 Branches are grouped by their name divided by the character '/'.Ex::
409 Current branch will display a star icon. If current branch has commits
410 ahead/behind it will display an up/down arrow with its number.
414 Various actions are available through the right-click context menu.
415 Different actions are available depending of selected branch status.
419 The checkout action runs
420 `git checkout [<branchname>] <https://git-scm.com/docs/git-checkout>`_.
422 Merge in current branch
423 ~~~~~~~~~~~~~~~~~~~~~~~
424 The merge action runs
425 `git merge --no-commit [<branchname>] <https://git-scm.com/docs/git-merge>`_.
430 `git pull --no-ff [<remote>] [<branchname>] <https://git-scm.com/docs/git-pull>`_.
435 `git push [<remote>] [<branchname>] <https://git-scm.com/docs/git-push>`_.
439 The rename branch action runs
440 `git branch -M [<branchname>] <https://git-scm.com/docs/git-push>`_.
444 The delete branch branch action runs
445 `git branch -D [<branchname>] <https://git-scm.com/docs/git-branch>`_.
449 The remote branch action runs
450 `git push --delete [<remote>] [<branchname>] <https://git-scm.com/docs/git-push>`_.
455 Use the ``File -> Apply Patches`` menu item to begin applying patches.
457 Dragging and dropping patches onto the `git cola` interface
458 adds the patches to the list of patches to apply using
459 `git am <http://git-scm.com/docs/git-am>`_.
461 You can drag either a set of patches or a directory containing patches.
462 Patches can be sorted using in the interface and are applied in the
463 same order as is listed in the list.
465 When a directory is dropped `git cola` walks the directory
466 tree in search of patches. `git cola` sorts the list of
467 patches after they have all been found. This allows you
468 to control the order in which patches are applied by placing
469 patchsets into alphanumerically-sorted directories.
471 CUSTOM WINDOW SETTINGS
472 ======================
473 `git cola` remembers modifications to the layout and arrangement
474 of tools within the `git cola` interface. Changes are saved
475 and restored at application shutdown/startup.
477 `git cola` can be configured to not save custom layouts by unsetting
478 the `Save Window Settings` option in the `git cola` preferences.
480 DARK MODE AND WINDOW MANAGER THEMES
481 ===================================
482 Git Cola contains a ``default`` theme which follows the current Qt style and a
483 handful of built-in color themes. See :ref:`cola_theme` for more details.
485 To use icons appropriate for a dark application theme, configure
486 ``git config --global cola.icontheme dark`` to use the dark icon theme.
487 See :ref:`cola_icontheme` for more details.
489 On macOS, using the ``default`` theme will automatically inherit "Dark Mode"
490 color themes when configured via System Preferences. You will need to
491 configure the dark icon theme as noted above when dark mode is enabled.
493 On Linux, you may want Qt to follow the Window manager theme by configuring it
494 to do so using the ``qt5ct`` Qt5 configuration tool. Install ``qt5ct`` on
495 Debian/Ubuntu systems to make this work.::
497 sudo apt install qt5ct
499 Once installed, update your `~/.bash_profile` to activate ``qt5ct``::
501 # Use the style configured using the qt5ct tool
502 export QT_QPA_PLATFORMTHEME=qt5ct
504 This only work with the `default` theme. The other themes replace the color
505 palette with theme-specific colors.
507 Some systems may require that you override `QT_STYLE_OVERRIDE` in order to
508 use a dark theme or to better interact with the Desktop environment.
509 Some systems provide a theme that you can install::
511 sudo apt-get install adwaita-qt
513 You can activate the theme using the following enviornment variable::
515 # Override the default theme to adwait-dark
516 export QT_STYLE_OVERRIDE=adwaita-dark
518 `QT_STYLE_OVERRIDE` may already be set in your Desktop Environment, so check that
519 variable for reference if you get unexpected hangs when launching `git-cola` or
520 when the default theme does not follow the desktop's theme on Linux.
522 If you don't want to set this variable globally then you can set it when launching
523 cola from the command-line::
525 QT_STYLE_OVERRIDE=adwaita-dark git cola
527 The following is a user-contributed custom `git-cola.desktop` file that can be used to
528 launch Git Cola with these settings preset for you::
532 Comment=The highly caffeinated Git GUI
534 Exec=env QT_STYLE_OVERRIDE=adwaita-dark git-cola --prompt --icon-theme dark
539 Categories=Development;RevisionControl;
540 X-KDE-SubstituteUID=false
542 You may also want to customize the diff colors when using a dark theme::
544 git config --global cola.color.add 86c19f
545 git config --global cola.color.remove c07067
547 Please see `#760 <https://github.com/git-cola/git-cola/issues/760>`_ for more details.
551 To create your own custom theme for Git Cola just create a QSS file and put it in
552 ``~/.config/themes/``. You can add as many files as you want. Each file will become
553 an option in ``Menu -> File -> Preferences -> Appearance -> GUI theme``.
555 Some examples can be found here `Qt Style Sheets Examples <https://doc.qt.io/qt-5/stylesheet-examples.html>`_.
558 CONFIGURATION VARIABLES
559 =======================
560 These variables can be set using `git config` or from the settings.
562 cola.autocompletepaths
563 ----------------------
564 Set to `false` to disable auto-completion of filenames in completion widgets.
565 This can speed up operations when working in large repositories.
568 cola.autoloadCommitTemplate
569 ---------------------------
570 Set to `true` to automatically load the commit template in the commit message
571 editor If the commit.template variable has not been configured, raise the
577 The command used to blame files. Defaults to `git gui blame`.
581 Whether to create a dock widget with the `Browser` tool.
582 Defaults to `false` to speedup startup time.
586 Inspect unmerged files for conflict markers before staging them.
587 This feature helps prevent accidental staging of unresolved merge conflicts.
592 `git cola`, when run outside of a Git repository, prompts the user for a
593 repository. Set `cola.defaultrepo` to the path of a Git repository to make
594 `git cola` attempt to use that repository before falling back to prompting
595 the user for a repository.
599 Specifies an additional dictionary for `git cola` to use in its spell checker.
600 This should be configured to the path of a newline-separated list of words.
604 Expand tabs into spaces in the commit message editor. When set to `true`,
605 `git cola` will insert a configurable number of spaces when tab is pressed.
606 The number of spaces is determined by `cola.tabwidth`.
611 Enables per-file gitattributes encoding and binary file support.
612 This tells `git cola` to honor the configured encoding when displaying
615 A `.gitattributes` file can set the ``binary`` attribute in order to force
616 specific untracked paths to be treated as binary files when diffing.
617 Binary files are displayed using a hexdump display.
621 # Treat *.exr files as binary files.
626 Specifies the font to use for `git cola`'s diff display.
630 Specifies the High DPI displays scale factor. Set `0` to automatically scaled.
631 Setting value between 0 and 1 is undefined.
632 This option requires at least Qt 5.6 to work.
633 See `Qt QT_SCALE_FACTOR documentation <https://doc.qt.io/qt-5/highdpi.html>`_
634 for more information.
640 Specifies the icon themes to use throughout `git cola`. The theme specified
641 must be the name of the subdirectory containing the icons, which in turn must
642 be placed in the inside the main "icons" directory in `git cola`'s
645 If unset, or set either "light" or "default", then the default style will be
646 used. If set to "dark" then the built-in "dark" icon theme, which is
647 suitable for a dark window manager theme, will be used.
649 If set to an absolute directory path then icons in that directory will be used.
650 This value can be set to multiple values using,
651 ``git config --add cola.icontheme $theme``.
653 This setting can be overridden by the `GIT_COLA_ICON_THEME` environment
654 variable, which can specify multiple themes using a colon-separated value.
656 The icon theme can also be specified by passing ``--icon-theme=<theme>`` on the
657 command line, once for each icon theme, in the order that they should be
658 searched. This can be used to override a subset of the icons, and fallback
659 to the built-in icons for the remainder.
661 cola.imagediff.<extension>
662 --------------------------
663 Enable image diffs for the specified file extension. For example, configuring
664 `git config --global cola.imagediff.svg false` will disable use of the visual
665 image diff for `.svg` files in all repos until is is explicitly toggled on.
670 Set to `false` to disable file system change monitoring. Defaults to `true`,
671 but also requires either Linux with inotify support or Windows with `pywin32`
672 installed for file system change monitoring to actually function.
676 Set to `true` to automatically refresh when `git cola` gains focus. Defaults
677 to `false` because this can cause a pause whenever switching to `git cola` from
682 Whether to automatically break long lines while editing commit messages.
683 Defaults to `true`. This setting is configured using the `Preferences`
684 dialog, but it can be toggled for one-off usage using the commit message
685 editor's options sub-menu.
689 `git cola` caps the number of recent repositories to avoid cluttering
690 the start and recent repositories menu. The maximum number of repositories to
691 remember is controlled by `cola.maxrecent` and defaults to `8`.
695 `git cola` encodes paths dragged from its widgets into `utf-16` when adding
696 them to the drag-and-drop mime data (specifically, the `text/x-moz-url` entry).
697 `utf-16` is used to make `gnome-terminal` see the right paths, but other
698 terminals may expect a different encoding. If you are using a terminal that
699 expects a modern encoding, e.g. `terminator`, then set this value to `utf-8`.
703 `git cola` avoids reading large binary untracked files.
704 The maximum size to read is controlled by `cola.readsize`
705 and defaults to `2048`.
707 cola.resizebrowsercolumns
708 -------------------------
709 `git cola` will automatically resize the file browser columns as folders are
710 expanded/collapsed when ``cola.resizebrowsercolumns`` is set to `true`.
714 The "Stage" button in the `git cola` Actions panel stages all files when it is
715 activated and no files are selected. This can be problematic if it is
716 accidentally triggered after carefully preparing the index with staged
717 changes. "Safe Mode" is enabled by setting `cola.safemode` to `true`.
718 When enabled, `git cola` will do nothing when "Stage" is activated without a
719 selection. Defaults to `false`.
721 cola.savewindowsettings
722 -----------------------
723 `git cola` will remember its window settings when set to `true`.
724 Window settings and X11 sessions are saved in `$HOME/.config/git-cola`.
728 `git cola` displays the absolute path of the repository in the window title.
729 This can be disabled by setting `cola.showpath` to `false`.
734 `git cola` will sign commits by default when set `true`. Defaults to `false`.
735 See the section below on setting up GPG for more details.
739 Control how the list of repositories is displayed in the startup dialog.
740 Set to `list` to view the list of repositories as a list, or `folder` to view
741 the list of repositories as a collection of folder icons.
746 Set to `true` to indent files in the Status widget. Files in the `Staged`,
747 `Modified`, etc. categories will be grouped in a tree-like structure.
750 cola.statusshowtotals
751 ---------------------
752 Set to `true` to display files counts in the Status widget's category titles.
757 The number of columns occupied by a tab character. Defaults to 8.
761 The command to use when launching commands within a graphical terminal.
763 `cola.terminal` defaults to `xterm -e` when unset.
764 e.g. when opening a shell, `git cola` will run `xterm -e $SHELL`.
766 `git cola` has built-in support for `xterm`, `gnome-terminal`, `konsole`.
767 If either `gnome-terminal`, `xfce4-terminal`, or `konsole` are installed
768 then they will be preferred over `xterm` when `cola.terminal` is unset.
770 The table below shows the built-in values that are used for the respective
771 terminal. You can force the use of a specific terminal by configuring cola
774 cola.terminalshellquote
775 -----------------------
776 Some terminal require that the command string get passed as a string.
777 For example, ``xfce4-terminal -e "git difftool"`` requires shellquoting,
778 whereas ``gnome-terminal -- git difftool`` does not.
780 You should not need to set this variable for the built-in terminals
781 cola knows about -- it will behave correctly without configuration.
782 For example, when unconfigured, cola already knows that xfce4-terminal
783 requires shellquoting.
785 This configuration variable is for custom terminals outside of the builtin set.
786 The table below shows the builtin configuration.
788 Terminal cola.terminal cola.terminalshellquote
789 -------- ------------- -----------------------
790 gnome-terminal gnome-terminal -- false
791 konsole konsole -e false
792 xfce4-terminal xfce4-terminal -e true
797 The number of columns used for line wrapping.
798 Tabs are counted according to `cola.tabwidth`.
804 Specifies the GUI theme to use throughout `git cola`. The theme specified
805 must be one of the following values:
807 * `default` – default Qt theme, may appear different on various systems
817 If unset, or set to an invalid value, then the default style will be
818 used. The `default` theme is generated by Qt internal engine and should look
819 native but may look noticeably different on different platforms. The flat
820 themes on the other hand should look similar (but not identical) on various
823 The GUI theme can also be specified by passing ``--theme=<name>`` on the
828 Set to `true` to enable "turbo" mode. "Turbo" mode disables some
829 features that can slow things down when operating on huge repositories.
830 "Turbo" mode will skip loading Git commit messages, author details, status
831 information, and commit date details in the `File Browser` tool.
836 The default diff text color, in hexadecimal #RRGGBB notation.
837 Defaults to "#030303"::
839 git config cola.color.text '#030303'
843 The default diff "add" background color, in hexadecimal #RRGGBB notation.
844 Defaults to "#d2ffe4"::
846 git config cola.color.add '#d2ffe4'
850 The default diff "remove" background color, in hexadecimal #RRGGBB notation.
851 Defaults to "#fee0e4"::
853 git config cola.color.remove '#fee0e4'
857 The default diff header text color, in hexadecimal #RRGGBB notation.
858 Defaults to "#bbbbbb"::
860 git config cola.color.header '#bbbbbb'
864 Hooks are programs you can place in a hooks directory to trigger actions at
865 certain points in git’s execution. Hooks that don’t have the executable bit
868 By default the hooks directory is ``$GIT_DIR/hooks``, but that can
869 be changed via the ``core.hooksPath`` configuration variable
871 The ``cola-prepare-commit-msg`` hook functionality and Cola's Git LFS
872 detection honors this configuration.
874 Please see the `git hooks documentation <https://git-scm.com/docs/githooks>`_
879 The number of diff context lines to display.
883 `git cola` avoids showing untracked files when set to `false`.
887 The default text editor to use is defined in `gui.editor`.
888 The config variable overrides the VISUAL environment variable.
893 The history browser to use when visualizing history.
898 The default diff tool to use.
902 The default merge tool to use.
906 Your email address to be recorded in any newly created commits.
907 Can be overridden by the 'GIT_AUTHOR_EMAIL', 'GIT_COMMITTER_EMAIL', and
908 'EMAIL' environment variables.
912 Your full name to be recorded in any newly created commits.
913 Can be overridden by the 'GIT_AUTHOR_NAME' and 'GIT_COMMITTER_NAME'
914 environment variables.
916 ENVIRONMENT VARIABLES
917 =====================
921 When set in the environment, `GIT_COLA_ICON_THEME` overrides the
922 theme specified in the `cola.icontheme` configuration.
923 Read :ref:`cola_icontheme` for more details.
927 .. Important:: `GIT_COLA_SCALE` should not be used with newer versions of Qt.
929 Set `QT_AUTO_SCREEN_SCALE_FACTOR` to `1` and Qt will automatically
930 scale the interface to the correct size based on the display DPI.
931 This option is also available by setting `cola.hidpi` configuration.
933 See the `Qt High DPI documentation <https://doc.qt.io/qt-5/highdpi.html>`_
936 `git cola` can be made to scale its interface for HiDPI displays.
937 When defined, `git cola` will scale icons, radioboxes, and checkboxes
938 according to the scale factor. The default value is `1`.
939 A good value is `2` for high-resolution displays.
941 Fonts are not scaled, as their size can already be set in the settings.
945 When defined, `git cola` logs `git` commands to stdout.
946 When set to `full`, `git cola` also logs the exit status and output.
947 When set to `trace`, `git cola` logs to the `Console` widget.
951 Specifies the default editor to use.
952 This is ignored when the `gui.editor` configuration variable is defined.
956 `git cola` automatically detects your language and presents some
957 translations when available. This may not be desired, or you
958 may want `git cola` to use a specific language.
960 You can make `git cola` use an alternative language by creating a
961 `~/.config/git-cola/language` file containing the standard two-letter
962 gettext language code, e.g. "en", "de", "ja", "zh", etc.::
964 mkdir -p ~/.config/git-cola &&
965 echo en >~/.config/git-cola/language
967 Alternatively you may also use LANGUAGE environmental variable to temporarily
968 change `git cola`'s language just like any other gettext-based program. For
969 example to temporarily change `git cola`'s language to English::
973 To make `git cola` use the zh_TW translation with zh_HK, zh, and en as a
976 LANGUAGE=zh_TW:zh_HK:zh:en git cola
981 `git cola` allows you to define custom GUI actions by setting `git config`
982 variables. The "name" of the command appears in the "Actions" menu.
986 Specifies the shell command line to execute when the corresponding item of the
987 Tools menu is invoked. This option is mandatory for every tool. The command is
988 executed from the root of the working directory, and in the environment it
989 receives the name of the tool as GIT_GUITOOL, the name of the currently
990 selected file as FILENAME, and the name of the current branch as CUR_BRANCH
991 (if the head is detached, CUR_BRANCH is empty).
993 If ``<name>`` contains slashes (``/``) then the leading part of the name,
994 up until the final slash, is treated like a path of submenus under which the
995 actions will be created.
997 For example, configuring ``guitool.Commands/Util/echo.cmd`` creates a
998 ``Commands`` menu inside the top-level ``Actions`` menu, a ``Util`` menu
999 inside the ``Commands`` menu and an ``echo`` action inside the ``Commands``
1002 guitool.<name>.background
1003 -------------------------
1004 Run the command in the background (similar to editing and difftool actions).
1005 This avoids blocking the GUI. Setting `background` to `true` implies
1006 `noconsole` and `norescan`.
1008 guitool.<name>.needsfile
1009 ------------------------
1010 Run the tool only if a diff is selected in the GUI. It guarantees that
1011 FILENAME is not empty.
1013 guitool.<name>.noconsole
1014 ------------------------
1015 Run the command silently, without creating a window to display its output.
1017 guitool.<name>.norescan
1018 -----------------------
1019 Don’t rescan the working directory for changes after the tool finishes
1022 guitool.<name>.confirm
1023 ----------------------
1024 Show a confirmation dialog before actually running the tool.
1026 guitool.<name>.argprompt
1027 ------------------------
1028 Request a string argument from the user, and pass it to the tool through the
1029 ARGS environment variable. Since requesting an argument implies confirmation,
1030 the confirm option has no effect if this is enabled. If the option is set to
1031 true, yes, or 1, the dialog uses a built-in generic prompt; otherwise the
1032 exact value of the variable is used.
1034 guitool.<name>.revprompt
1035 ------------------------
1036 Request a single valid revision from the user, and set the REVISION
1037 environment variable. In other aspects this option is similar to argprompt,
1038 and can be used together with it.
1040 guitool.<name>.revunmerged
1041 --------------------------
1042 Show only unmerged branches in the revprompt subdialog. This is useful for
1043 tools similar to merge or rebase, but not for things like checkout or reset.
1045 guitool.<name>.title
1046 --------------------
1047 Specifies the title to use for the prompt dialog.
1048 Defaults to the tool name.
1050 guitool.<name>.prompt
1051 ---------------------
1052 Specifies the general prompt string to display at the top of the dialog,
1053 before subsections for argprompt and revprompt.
1054 The default value includes the actual command.
1056 guitool.<name>.shortcut
1057 -----------------------
1058 Specifies a keyboard shortcut for the custom tool.
1060 The value must be a valid string understood by the `QAction::setShortcut()` API.
1061 See http://qt-project.org/doc/qt-4.8/qkeysequence.html#QKeySequence-2
1062 for more details about the supported values.
1064 Avoid creating shortcuts that conflict with existing built-in `git cola`
1065 shortcuts. Creating a conflict will result in no action when the shortcut
1068 SETTING UP GPG FOR SIGNED COMMITS
1069 =================================
1070 When creating signed commits, `gpg` will attempt to read your password from the
1071 terminal from which `git cola` was launched.
1072 The way to make this work smoothly is to use a GPG agent so that you can avoid
1073 needing to re-enter your password every time you commit.
1075 This also gets you a graphical passphrase prompt instead of getting prompted
1076 for your password in the terminal.
1078 Install gpg-agent and friends
1079 -----------------------------
1080 On Mac OS X, you may need to `brew install gpg-agent` and install the
1081 `Mac GPG Suite <https://gpgtools.org/macgpg2/>`_.
1083 On Linux use your package manager to install gnupg2,
1084 gnupg-agent and pinentry-qt, e.g.::
1086 sudo apt-get install gnupg2 gnupg-agent pinentry-qt
1088 On Linux, you should also configure Git so that it uses gpg2 (gnupg2),
1089 otherwise you will get errors mentioning, "unable to open /dev/tty".
1090 Set Git's `gpg.program` to `gpg2`::
1092 git config --global gpg.program gpg2
1094 Configure gpg-agent and a pin-entry program
1095 -------------------------------------------
1096 On Mac OS X, edit `~/.gnupg/gpg.conf` to include the line,::
1100 This is typically not needed on Linux, where `gpg2` is used, as
1101 this is the default value when using `gpg2`.
1103 Next, edit `~/.gnupg/gpg-agent.conf` to contain a pinentry-program line
1104 pointing to the pinentry program for your platform.
1106 The following example `~/.gnupg/gpg-agent.conf` shows how to use
1107 pinentry-gtk-2 on Linux::
1109 pinentry-program /usr/bin/pinentry-gtk-2
1110 default-cache-ttl 3600
1112 This following example `.gnupg/gpg-agent.conf` shows how to use MacGPG2's
1113 pinentry app on On Mac OS X::
1115 pinentry-program /usr/local/MacGPG2/libexec/pinentry-mac.app/Contents/MacOS/pinentry-mac
1116 default-cache-ttl 3600
1120 Once this has been set up then you will need to reload your gpg-agent config::
1122 echo RELOADAGENT | gpg-connect-agent
1124 If you see the following output::
1128 Then the daemon is already running, and you do not need to start it yourself.
1130 If it is not running, eval the output of ``gpg-agent --daemon`` in your shell
1131 prior to launching `git cola`.::
1133 eval $(gpg-agent --daemon)
1141 If Git is installed in a custom location, e.g. not installed in `C:/Git` or
1142 Program Files, then the path to Git must be configured by creating a file in
1143 your home directory `~/.config/git-cola/git-bindir` that points to your git
1144 installation. e.g.::
1148 SSH Agents for Key-based Authentication
1149 ---------------------------------------
1150 You may need to setup ssh-agent in order to use SSH key-based authentication
1151 on Windows. It has been reported that starting OpenSSH agent in
1152 Windows Services and adding the key using Powershell are necessary in order
1153 to get things working.
1155 Please see the following links for more details.
1157 https://stackoverflow.com/questions/18683092/how-to-run-ssh-add-on-windows
1161 `FIPS Security Mode <https://developer.mozilla.org/en-US/docs/Mozilla/Projects/NSS/FIPS_Mode_-_an_explanation>`_
1162 is available in newer versions of Python. These include Python 3.9+ and the
1163 patched Python 3.6 used by CentOS8/RHEL8 (and possibly others).
1165 Git Cola uses the ``hashlib.md5`` function and adheres to the FIPS security
1166 mode when available. Git Cola does not use the MD5 value for security purposes.
1167 MD% is used only for the purposes of implementing the ``cola/gravatar.py``
1173 Git Cola's Git Repository
1174 -------------------------
1175 https://github.com/git-cola/git-cola/
1179 https://git-cola.github.io/
1183 https://groups.google.com/group/git-cola