ssh-askpass: add switch to hide/show input
[git-cola.git] / share / doc / git-cola / git-cola.rst
blob860361b34cfc8b8e3d43c833f09f38f9d325691e
1 ===========
2 git-cola(1)
3 ===========
5 SYNOPSIS
6 ========
7 git cola [options] [sub-command]
9 DESCRIPTION
10 ===========
11 git cola is a sleek and powerful Git GUI.
13 OPTIONS
14 =======
16 --amend
17 -------
18 Start `git cola` in amend mode.
20 --prompt
21 --------
22 Prompt for a Git repository.  Defaults to the current directory.
24 -r, --repo <path>
25 -----------------
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.
32 --version
33 ---------
34 Print the `git cola` version and exit.
36 -h, --help
37 ----------
38 Show usage and optional arguments.
40 --help-commands
41 ---------------
42 Show available sub-commands.
44 SUB-COMMANDS
45 ============
49 Apply patches.
51 archive
52 -------
53 Export tarballs from Git.
55 branch
56 ------
57 Create branches.
59 browse
60 ------
61 Browse tracked files.
63 config
64 ------
65 Configure settings.
67 dag
68 ---
69 Start the `git dag` Git history browser.
71 diff
72 ----
73 Diff changed files.
75 fetch
76 -----
77 Fetch history from remote repositories.
79 grep
80 ----
81 Use `git grep` to search for content.
83 merge
84 -----
85 Merge branches.
87 pull
88 ----
89 Fetch and merge remote branches.
91 push
92 ----
93 Push branches to remotes.
95 rebase
96 ------
97 Start an interactive rebase.
99 remote
100 ------
101 Create and edit remotes.
103 search
104 ------
105 Search for commits.
107 stash
108 -----
109 Stash uncommitted modifications.
113 Create tags.
115 version
116 -------
117 Print the `git cola` version.
119 CONFIGURE YOUR EDITOR
120 =====================
121 The editor used by `Ctrl-e` is configured from the Preferences screen.
122 The environment variable `$VISUAL` is consulted when no editor has been
123 configured.
125 *ProTip*: Configuring your editor to `gvim -f -p` will open multiple tabs
126 when editing files.  `gvim -f -o` uses splits.
128 `git cola` is {vim, emacs, textpad, notepad++}-aware.
129 When you select a line in the `grep` screen and press any of
130 `Enter`, `Ctrl-e`, or the `Edit` button, you are taken to that exact line.
132 The editor preference is saved in the `gui.editor` variable using
133 `git config <http://git-scm.com/docs/git-config>`_.
135 KEYBOARD SHORTCUTS
136 ==================
137 `git cola` has many useful keyboard shortcuts.
139 You can see the available shortcuts by pressing the ``?`` key,
140 choosing ``Help -> Keyboard shortcuts`` from the main menu,
141 or by consulting the `git cola keyboard shortcuts reference <https://git-cola.github.io/share/doc/git-cola/hotkeys.html>`_.
143 TOOLS
144 =====
145 The `git cola` interface is composed of various cooperating tools.
146 Double-clicking a tool opens it in its own subwindow.
147 Dragging it around moves and places it within the window.
149 Tools can be hidden and rearranged however you like.
150 `git cola` carefully remembers your window layout and restores
151 it the next time it is launched.
153 The `Control-{1, 2, 3, ...}` hotkey gives focus to a specific tool.
154 A hidden tool can be re-opened using the `Tools` menu or
155 the `Shift+Control-{1, 2, 3, ...}` shortcut keys.
157 The Diff editor can be focused with `Ctrl-j`.
158 the Status tool can be focused with `Ctrl-k`.
159 the Commit tool can be focused with `Ctrl-l`.
161 .. _status:
163 STATUS
164 ======
165 The `Status` tool provides a visual analog to the
166 `git status <http://git-scm.com/docs/git-status>`_ command.
168 `Status` displays files that are `modified` relative to the staging area,
169 `staged` for the next commit, `unmerged` files from an in-progress merge,
170 and files that are `untracked` to git.
172 These are the same categories one sees when running
173 `git status <http://git-scm.com/docs/git-status>`_
174 on the command line.
176 You can navigate through the list of files using keyboard arrows as well
177 as the ergonomical and vim-like `j` and `k` shortcut keys.
179 There are several convenient ways to interact with files in the `Status` tool.
181 Selecting a file displays its diff in the :ref:`Diff` viewer.
182 Double-clicking a file stages its contents, as does the
183 the `Ctrl-s` shortcut key.
185 `Ctrl-e` opens selected files in the conifgured editor, and
186 `Ctrl-d` opens selected files using `git difftool <http://git-scm.com/docs/git-difftool>`_
188 Additional actions can be performed using the right-click context menu.
190 Actions
191 -------
192 Clicking the `Staged` folder shows a diffstat for the index.
194 Clicking the `Modified` folder shows a diffstat for the worktree.
196 Clicking individual files sends diffs to the `Diff Display`.
198 Double-clicking individual files adds and removes their content from the index.
200 Various actions are available through the right-click context menu.
201 Different actions are available depending a file's status.
203 Stage Selected
204 ~~~~~~~~~~~~~~
205 Add to the staging area using `git add <http://git-scm.com/docs/git-add>`_
206 Marks unmerged files as resolved.
208 Launch Editor
209 ~~~~~~~~~~~~~
210 Launches the configured visual text editor
212 Launch Difftool
213 ~~~~~~~~~~~~~~~
214 Visualize changes using `git difftool`.
216 Revert Unstaged Edits
217 ~~~~~~~~~~~~~~~~~~~~~
218 Reverts unstaged content by checking out selected paths
219 from the index/staging area
221 Revert Uncommitted Edits
222 ~~~~~~~~~~~~~~~~~~~~~~~~
223 Throws away uncommitted edits
225 Unstage Selected
226 ~~~~~~~~~~~~~~~~
227 Remove from the index/staging area with
228 `git reset <http://git-scm.com/docs/git-reset>`_
230 Launch Merge Tool
231 ~~~~~~~~~~~~~~~~~
232 Resolve conflicts using `git mergetool <http://git-scm.com/docs/git-mergetool>`_.
234 Delete File(s)
235 ~~~~~~~~~~~~~~
236 Delete untracked files from the filesystem.
238 Add to .gitignore
239 ~~~~~~~~~~~~~~~~~
240 Adds untracked files to to the .gitignore file.
242 .. _diff:
244 DIFF
245 ====
246 The diff viewer/editor displays diffs for selected files.
247 Additions are shown in green and removals are displayed in light red.
248 Extraneous whitespace is shown with a pure-red background.
250 Right-clicking in the diff provides access to additional actions
251 that use either the cursor location or text selection.
253 Staging content for commit
254 --------------------------
255 The ``@@`` patterns denote a new diff hunk.  Selecting lines of diff
256 and using the `Stage Selected Lines` command will stage just the selected
257 lines.  Clicking within a diff hunk and selecting `Stage Diff Hunk` stages the
258 entire patch diff hunk.
260 The corresponding opposite commands can be performed on staged files as well,
261 e.g. staged content can be selectively removed from the index when we are
262 viewing diffs for staged content.
264 COMMIT MESSAGE EDITOR
265 =====================
267 The commit message editor is a simple text widget
268 for entering commit messages.
270 You can navigate between the `Subject` and `Extended description...`
271 fields using the keyboard arrow keys.
273 Pressing enter when inside the `Subject` field jumps down to the
274 extended description field.
276 The `Options` button menu to the left of the subject field
277 provides access to the additional actions.
279 The `Ctrl+i` keyboard shortcut adds a standard "Signed-off-by: " line,
280 and `Ctrl+Enter` creates a new commit using the commit message and
281 staged content.
283 Sign Off
284 --------
285 The `Sign Off` button adds a standard::
287     Signed-off-by: A. U. Thor <a.u.thor@example.com>
289 line to the bottom of the commit message.
291 Invoking this action is equivalent to passing the ``-s`` option
292 to `git commit <http://git-scm.com/docs/git-commit>`_.
294 Commit
295 ------
296 The commit button runs
297 `git commit <http://git-scm.com/docs/git-commit>`_.
298 The contents of the commit message editor is provided as the commit message.
300 Only staged files are included in the commit -- this is the same behavior
301 as running ``git commit`` on the command-line.
303 Line and Column Display
304 -----------------------
305 The current line and column number is displayed by the editor.
306 E.g. a ``5,0`` display means that the cursor is located at
307 line five, column zero.
309 The display changes colors when lines get too long.
310 Yellow indicates the safe boundary for sending patches to a mailing list
311 while keeping space for inline reply markers.
313 Orange indicates that the line is starting to run a bit long and should
314 break soon.
316 Red indicates that the line is running up against the standard
317 80-column limit for commit messages.
319 Keeping commit messages less than 76-characters wide is encouraged.
320 `git log <http://git-scm.com/docs/git-log>`_
321 is a great tool but long lines mess up its formatting for everyone else,
322 so please be mindful when writing commit messages.
325 Amend Last Commit
326 -----------------
327 Clicking on `Amend Last Commit` makes `git cola` amend the previous commit
328 instead of creating a new one.  `git cola` loads the previous commit message
329 into the commit message editor when this option is selected.
331 The `Status` tool will display all of the changes for the amended commit.
333 Create Signed Commit
334 --------------------
335 Tell `git commit` and `git merge` to sign commits using GPG.
337 Using this option is equivalent to passing the ``--gpg-sign`` option to
338 `git commit <http://git-scm.com/docs/git-commit>`_ and
339 `git merge <http://git-scm.com/docs/git-merge>`_.
341 This option's default value can be configured using the `cola.signcommits`
342 configuration variable.
344 Prepare Commit Message
345 ----------------------
346 The ``Commit -> Prepare Commit Message`` action or `Ctrl-Shift-Return` keyboard shortcut
347 runs the `cola-prepare-commit-msg` hook if it is available in `.git/hooks/`.
348 This is a `git cola`-specific hook that takes the same parameters
349 as Git's `prepare-commit-msg hook <https://git-scm.com/book/en/v2/Customizing-Git-Git-Hooks>`_
351 The hook is passed the path to `.git/GIT_COLA_MSG` as the first argument and the hook is expected to write
352 an updated commit message to specified path.  After running this action, the
353 commit message editor is updated with the new commit message.
355 To override the default path to this hook set the
356 `cola.prepareCommitMessageHook` `git config` variable to the path to the
357 hook script.  This is useful if you would like to use a common hook
358 across all repositories.
360 BRANCHES
361 ========
363 The `Branches` tool provides a visual tree to navigate through the branches.
364 The tree has three main nodes `Local Branch`, `Remote Branch` and `Tags`.
365 Branches are grouped by their name divided by the character '/'.Ex::
367     branch/feature/foo
368     branch/feature/bar
369     branch/doe
371 Will produce::
373     branch
374         - doe
375         + feature
376             - bar
377             - foo
379 Current branch will display a star icon. If current branch has commits
380 ahead/behind it will display an up/down arrow with its number.
382 Actions
383 -------
384 Various actions are available through the right-click context menu.
385 Different actions are available depending of selected branch status.
387 Checkout
388 ~~~~~~~~
389 The checkout action runs
390 `git checkout [<branchname>] <https://git-scm.com/docs/git-checkout>`_.
392 Merge in current branch
393 ~~~~~~~~~~~~~~~~~~~~~~~
394 The merge action runs
395 `git merge --no-commit [<branchname>] <https://git-scm.com/docs/git-merge>`_.
397 Pull
398 ~~~~
399 The pull action runs
400 `git pull --no-ff [<remote>] [<branchname>] <https://git-scm.com/docs/git-pull>`_.
402 Push
403 ~~~~
404 The push action runs
405 `git push [<remote>] [<branchname>] <https://git-scm.com/docs/git-push>`_.
407 Rename Branch
408 ~~~~~~~~~~~~~
409 The rename branch action runs
410 `git branch -M [<branchname>] <https://git-scm.com/docs/git-push>`_.
412 Delete Branch
413 ~~~~~~~~~~~~~
414 The delete branch branch action runs
415 `git branch -D [<branchname>] <https://git-scm.com/docs/git-branch>`_.
417 Delete Remote Branch
418 ~~~~~~~~~~~~~~~~~~~~
419 The remote branch action runs
420 `git push --delete [<remote>] [<branchname>] <https://git-scm.com/docs/git-push>`_.
423 APPLY PATCHES
424 =============
425 Use the ``File -> Apply Patches`` menu item to begin applying patches.
427 Dragging and dropping patches onto the `git cola` interface
428 adds the patches to the list of patches to apply using
429 `git am <http://git-scm.com/docs/git-am>`_.
431 You can drag either a set of patches or a directory containing patches.
432 Patches can be sorted using in the interface and are applied in the
433 same order as is listed in the list.
435 When a directory is dropped `git cola` walks the directory
436 tree in search of patches.  `git cola` sorts the list of
437 patches after they have all been found.  This allows you
438 to control the order in which patchs are applied by placing
439 patchsets into alphanumerically-sorted directories.
441 CUSTOM WINDOW SETTINGS
442 ======================
443 `git cola` remembers modifications to the layout and arrangement
444 of tools within the `git cola` interface.  Changes are saved
445 and restored at application shutdown/startup.
447 `git cola` can be configured to not save custom layouts by unsetting
448 the `Save Window Settings` option in the `git cola` preferences.
450 CONFIGURATION VARIABLES
451 =======================
452 These variables can be set using `git config` or from the settings.
454 cola.autocompletepaths
455 ----------------------
456 Set to `false` to disable auto-completion of filenames in completion widgets.
457 This can speed up operations when working in large repositories.
458 Defaults to `true`.
460 cola.autoloadCommitTemplate
461 ---------------------------
462 Set to `true` to automatically load the commit template in the commit message
463 editor If the commit.template variable has not been configured, raise the
464 corresponding error.
465 Defaults to `false`.
467 cola.blameviewer
468 ----------------
469 The command used to blame files.  Defaults to `git gui blame`.
471 cola.browserdockable
472 --------------------
473 Whether to create a dock widget with the `Browser` tool.
474 Defaults to `false` to speedup startup time.
476 cola.checkconflicts
477 -------------------
478 Inspect unmerged files for conflict markers before staging them.
479 This feature helps prevent accidental staging of unresolved merge conflicts.
480 Defaults to `true`.
482 cola.defaultrepo
483 ----------------
484 `git cola`, when run outside of a Git repository, prompts the user for a
485 repository.  Set `cola.defaultrepo` to the path of a Git repository to make
486 `git cola` attempt to use that repository before falling back to prompting
487 the user for a repository.
489 cola.dictionary
490 ---------------
491 Specifies an additional dictionary for `git cola` to use in its spell checker.
492 This should be configured to the path of a newline-separated list of words.
494 cola.expandtab
495 --------------
496 Expand tabs into spaces in the commit message editor.  When set to `true`,
497 `git cola` will insert a configurable number of spaces when tab is pressed.
498 The number of spaces is determined by `cola.tabwidth`.
499 Defaults to `false`.
501 cola.fileattributes
502 -------------------
503 Enables per-file gitattributes encoding support when set to `true`.
504 This tells `git cola` to honor the configured encoding when displaying
505 and applying diffs.
507 cola.fontdiff
508 -------------
509 Specifies the font to use for `git cola`'s diff display.
511 cola.hidpi
512 -------------
513 Specifies the High DPI displays scale factor. Set `0` to automatically scaled.
514 Setting value between 0 and 1 is undefined.
515 This option requires at least Qt 5.6 to work.
516 See `Qt QT_SCALE_FACTOR documentation <https://doc.qt.io/qt-5/highdpi.html>`_
517 for more information.
519 cola.icontheme
520 --------------
521 Specifies the icon themes to use throughout `git cola`. The theme specified
522 must be the name of the subdirectory containing the icons, which in turn must
523 be placed in the inside the main "icons" directory in `git cola`'s
524 installation prefix.
526 If unset, or set either "light" or "default", then the default style will be
527 used.  If set to "dark" then the built-in "dark" icon theme, which is
528 suitable for a dark window manager theme, will be used.
530 If set to an absolute directory path then icons in that directory will be used.
531 This value can be set to multiple values using,
532 ``git config --add cola.icontheme $theme``.
534 This setting can be overridden by the `GIT_COLA_ICON_THEME` environment
535 variable, which can specify multiple themes using a colon-separated value.
537 The icon theme can also be specified by passing ``--icon-theme=<theme>`` on the
538 command line, once for each icon theme, in the order that they should be
539 searched.  This can be used to override a subset of the icons, and fallback
540 to the built-in icons for the remainder.
542 cola.imagediff.<extension>
543 --------------------------
544 Enable image diffs for the specified file extension.  For example, configuring
545 `git config --global cola.imagediff.svg false` will disable use of the visual
546 image diff for `.svg` files in all repos until is is explicitly toggled on.
547 Defaults to `true`.
549 cola.inotify
550 ------------
551 Set to `false` to disable file system change monitoring.  Defaults to `true`,
552 but also requires either Linux with inotify support or Windows with `pywin32`
553 installed for file system change monitoring to actually function.
555 cola.refreshonfocus
556 -------------------
557 Set to `true` to automatically refresh when `git cola` gains focus.  Defaults
558 to `false` because this can cause a pause whenever switching to `git cola` from
559 another application.
561 cola.linebreak
562 --------------
563 Whether to automatically break long lines while editing commit messages.
564 Defaults to `true`.  This setting is configured using the `Preferences`
565 dialog, but it can be toggled for one-off usage using the commit message
566 editor's options sub-menu.
568 cola.maxrecent
569 --------------
570 `git cola` caps the number of recent repositories to avoid cluttering
571 the start and recent repositories menu.  The maximum number of repositories to
572 remember is controlled by `cola.maxrecent` and defaults to `8`.
574 cola.dragencoding
575 -----------------
576 `git cola` encodes paths dragged from its widgets into `utf-16` when adding
577 them to the drag-and-drop mime data (specifically, the `text/x-moz-url` entry).
578 `utf-16` is used to make `gnome-terminal` see the right paths, but other
579 terminals may expect a different encoding.  If you are using a terminal that
580 expects a modern encoding, e.g. `terminator`, then set this value to `utf-8`.
582 cola.readsize
583 -------------
584 `git cola` avoids reading large binary untracked files.
585 The maximum size to read is controlled by `cola.readsize`
586 and defaults to `2048`.
588 cola.safemode
589 -------------
590 The "Stage" button in the `git cola` Actions panel stages all files when it is
591 activated and no files are selected.  This can be problematic if it is
592 accidentally triggered after carefully preparing the index with staged
593 changes.  "Safe Mode" is enabled by setting `cola.safemode` to `true`.
594 When enabled, `git cola` will do nothing when "Stage" is activated without a
595 selection.  Defaults to `false`.
597 cola.savewindowsettings
598 -----------------------
599 `git cola` will remember its window settings when set to `true`.
600 Window settings and X11 sessions are saved in `$HOME/.config/git-cola`.
602 cola.showpath
603 -------------
604 `git cola` displays the absolute path of the repository in the window title.
605 This can be disabled by setting `cola.showpath` to `false`.
606 Defaults to `true`.
608 cola.signcommits
609 ----------------
610 `git cola` will sign commits by default when set `true`. Defaults to `false`.
611 See the section below on setting up GPG for more details.
613 cola.statusindent
614 -----------------
615 Set to `true` to indent files in the Status widget.  Files in the `Staged`,
616 `Modified`, etc. categories will be grouped in a tree-like structure.
617 Defaults to `false`.
619 cola.statusshowtotals
620 ---------------------
621 Set to `true` to display files counts in the Status widget's category titles.
622 Defaults to `false`.
624 cola.tabwidth
625 -------------
626 The number of columns occupied by a tab character.  Defaults to 8.
628 cola.terminal
629 -------------
630 The command to use when launching commands within a graphical terminal.
632 `cola.terminal` defaults to `xterm -e` when unset.
633 e.g. when opening a shell, `git cola` will run `xterm -e $SHELL`.
635 `git cola` has built-in support for `xterm`, `gnome-terminal`, `konsole`.
636 If either `gnome-terminal`, `xfce4-terminal`, or `konsole` are installed
637 then they will be preferred over `xterm` when `cola.terminal` is unset.
639 The table below shows the built-in values that are used for the respective
640 terminal.  You can force the use of a specific terminal by configuring cola
641 accordingly.
643 cola.terminalshellquote
644 -----------------------
645 Some terminal require that the command string get passed as a string.
646 For example, ``xfce4-terminal -e "git difftool"`` requires shellquoting,
647 whereas ``gnome-terminal -- git difftool`` does not.
649 You should not need to set this variable for the built-in terminals
650 cola knows about -- it will behave correctly without configuration.
651 For example, when unconfigured, cola already knows that xfce4-terminal
652 requires shellquoting.
654 This configuration variable is for custom terminals outside of the builtin set.
655 The table below shows the builtin configuration.
657     Terminal            cola.terminal           cola.terminalshellquote
658     --------            -------------           -----------------------
659     gnome-terminal      gnome-terminal --       false
660     konsole             konsole -e              false
661     xfce4-terminal      xfce4-terminal -e       true
662     xterm               xterm -e                false
664 cola.textwidth
665 --------------
666 The number of columns used for line wrapping.
667 Tabs are counted according to `cola.tabwidth`.
669 cola.theme
670 --------------
671 Specifies the GUI theme to use throughout `git cola`. The theme specified
672 must be one of the following values:
674 * `default` â€“ default Qt theme, may appear different on various systems
675 * `flat-dark-blue`
676 * `flat-dark-green`
677 * `flat-dark-grey`
678 * `flat-dark-red`
679 * `flat-light-blue`
680 * `flat-light-green`
681 * `flat-light-grey`
682 * `flat-light-red`
684 If unset, or set wrong value, then the default style will be
685 used. The `default` theme is generated by Qt internal engine and should look
686 most native but may look noticeably different on various systems. The flat
687 themes on the other hand should look similar (but not identical) on various
688 systems.
690 The GUI theme can also be specified by passing ``--theme=<name>`` on the
691 command line.
693 On Linux, you may want Qt to use the theme configured using the ``qt5ct``
694 Qt5 configuration tool.  You can do this by exporting `QT_QPA_PLATFORMTHEME`
695 in your `~/.bash_profile` to a value of ``qt5ct``::
697     # Use the style configured using the qt5ct tool
698     QT_QPA_PLATFORMTHEME=qt5ct
699     export QT_QPA_PLATFORMTHEME
701 This only work with the `default` theme.  The other themes replace the color
702 palette with a specific configuration.
704 cola.turbo
705 ----------
706 Set to `true` to enable "turbo" mode.  "Turbo" mode disables some
707 features that can slow things down when operating on huge repositories.
708 "Turbo" mode will skip loading Git commit messages, author details, status
709 information, and commit date details in the `File Browser` tool.
710 Defaults to `false`.
712 cola.color.text
713 ---------------
714 The default diff text color, in hexadecimal #RRGGBB notation.
715 Defaults to "#030303"::
717     git config cola.color.text '#030303'
719 cola.color.add
720 --------------
721 The default diff "add" background color, in hexadecimal #RRGGBB notation.
722 Defaults to "#d2ffe4"::
724     git config cola.color.add '#d2ffe4'
726 cola.color.remove
727 -----------------
728 The default diff "remove" background color, in hexadecimal #RRGGBB notation.
729 Defaults to "#fee0e4"::
731     git config cola.color.remove '#fee0e4'
733 cola.color.header
734 -----------------
735 The default diff header text color, in hexadecimal #RRGGBB notation.
736 Defaults to "#bbbbbb"::
738     git config cola.color.header '#bbbbbb'
740 gui.diffcontext
741 ---------------
742 The number of diff context lines to display.
744 gui.displayuntracked
745 --------------------
746 `git cola` avoids showing untracked files when set to `false`.
748 gui.editor
749 ----------
750 The default text editor to use is defined in `gui.editor`.
751 The config variable overrides the VISUAL environment variable.
752 e.g. `gvim -f -p`.
754 gui.historybrowser
755 ------------------
756 The history browser to use when visualizing history.
757 Defaults to `gitk`.
759 diff.tool
760 ---------
761 The default diff tool to use.
763 merge.tool
764 ----------
765 The default merge tool to use.
767 user.email
768 ----------
769 Your email address to be recorded in any newly created commits.
770 Can be overridden by the 'GIT_AUTHOR_EMAIL', 'GIT_COMMITTER_EMAIL', and
771 'EMAIL' environment variables.
773 user.name
774 ---------
775 Your full name to be recorded in any newly created commits.
776 Can be overridden by the 'GIT_AUTHOR_NAME' and 'GIT_COMMITTER_NAME'
777 environment variables.
780 ENVIRONMENT VARIABLES
781 =====================
783 GIT_COLA_ICON_THEME
784 -------------------
785 When set in the environment, `GIT_COLA_ICON_THEME` overrides the
786 theme specified in the `cola.icontheme` configuration.
787 Read the section on `cola.icontheme` above for more details.
789 GIT_COLA_SCALE
790 --------------
791 .. Important:: `GIT_COLA_SCALE` should not be used with newer versions of Qt.
793     Set `QT_AUTO_SCREEN_SCALE_FACTOR` to `1` and Qt will automatically
794     scale the interface to the correct size based on the display DPI.
795     This option is also available by setting `cola.hidpi` configuration.
797     See the `Qt High DPI documentation <https://doc.qt.io/qt-5/highdpi.html>`_
798     for more details.
800 `git cola` can be made to scale its interface for HiDPI displays.
801 When defined, `git cola` will scale icons, radioboxes, and checkboxes
802 according to the scale factor.  The default value is `1`.
803 A good value is `2` for high-resolution displays.
805 Fonts are not scaled, as their size can already be set in the settings.
807 GIT_COLA_TRACE
808 --------------
809 When defined, `git cola` logs `git` commands to stdout.
810 When set to `full`, `git cola` also logs the exit status and output.
811 When set to `trace`, `git cola` logs to the `Console` widget.
813 VISUAL
814 ------
815 Specifies the default editor to use.
816 This is ignored when the `gui.editor` configuration variable is defined.
818 LANGUAGE SETTINGS
819 =================
820 `git cola` automatically detects your language and presents some
821 translations when available.  This may not be desired, or you
822 may want `git cola` to use a specific language.
824 You can make `git cola` use an alternative language by creating a
825 `~/.config/git-cola/language` file containing the standard two-letter
826 gettext language code, e.g. "en", "de", "ja", "zh", etc.::
828     mkdir -p ~/.config/git-cola &&
829     echo en >~/.config/git-cola/language
831 Alternatively you may also use LANGUAGE environmental variable to temporarily
832 change `git cola`'s language just like any other gettext-based program.  For
833 example to temporarily change `git cola`'s language to English::
835     LANGUAGE=en git cola
837 To make `git cola` use the zh_TW translation with zh_HK, zh, and en as a
838 fallback.::
840     LANGUAGE=zh_TW:zh_HK:zh:en git cola
843 CUSTOM GUI ACTIONS
844 ==================
845 `git cola` allows you to define custom GUI actions by setting `git config`
846 variables.  The "name" of the command appears in the "Actions" menu.
848 guitool.<name>.cmd
849 ------------------
850 Specifies the shell command line to execute when the corresponding item of the
851 Tools menu is invoked. This option is mandatory for every tool. The command is
852 executed from the root of the working directory, and in the environment it
853 receives the name of the tool as GIT_GUITOOL, the name of the currently
854 selected file as FILENAME, and the name of the current branch as CUR_BRANCH
855 (if the head is detached, CUR_BRANCH is empty).
857 guitool.<name>.background
858 -------------------------
859 Run the command in the background (similar to editing and difftool actions).
860 This avoids blocking the GUI.  Setting `background` to `true` implies
861 `noconsole` and `norescan`.
863 guitool.<name>.needsfile
864 ------------------------
865 Run the tool only if a diff is selected in the GUI. It guarantees that
866 FILENAME is not empty.
868 guitool.<name>.noconsole
869 ------------------------
870 Run the command silently, without creating a window to display its output.
872 guitool.<name>.norescan
873 -----------------------
874 Don’t rescan the working directory for changes after the tool finishes
875 execution.
877 guitool.<name>.confirm
878 ----------------------
879 Show a confirmation dialog before actually running the tool.
881 guitool.<name>.argprompt
882 ------------------------
883 Request a string argument from the user, and pass it to the tool through the
884 ARGS environment variable. Since requesting an argument implies confirmation,
885 the confirm option has no effect if this is enabled. If the option is set to
886 true, yes, or 1, the dialog uses a built-in generic prompt; otherwise the
887 exact value of the variable is used.
889 guitool.<name>.revprompt
890 ------------------------
891 Request a single valid revision from the user, and set the REVISION
892 environment variable. In other aspects this option is similar to argprompt,
893 and can be used together with it.
895 guitool.<name>.revunmerged
896 --------------------------
897 Show only unmerged branches in the revprompt subdialog. This is useful for
898 tools similar to merge or rebase, but not for things like checkout or reset.
900 guitool.<name>.title
901 --------------------
902 Specifies the title to use for the prompt dialog.
903 Defaults to the tool name.
905 guitool.<name>.prompt
906 ---------------------
907 Specifies the general prompt string to display at the top of the dialog,
908 before subsections for argprompt and revprompt.
909 The default value includes the actual command.
911 guitool.<name>.shortcut
912 -----------------------
913 Specifies a keyboard shortcut for the custom tool.
915 The value must be a valid string understood by the `QAction::setShortcut()` API.
916 See http://qt-project.org/doc/qt-4.8/qkeysequence.html#QKeySequence-2
917 for more details about the supported values.
919 Avoid creating shortcuts that conflict with existing built-in `git cola`
920 shortcuts.  Creating a conflict will result in no action when the shortcut
921 is used.
923 SETTING UP GPG FOR SIGNED COMMITS
924 =================================
925 When creating signed commits, `gpg` will attempt to read your password from the
926 terminal from which `git cola` was launched.
927 The way to make this work smoothly is to use a GPG agent so that you can avoid
928 needing to re-enter your password every time you commit.
930 This also gets you a graphical passphrase prompt instead of getting prompted
931 for your password in the terminal.
933 Install gpg-agent and friends
934 -----------------------------
935 On Mac OS X, you may need to `brew install gpg-agent` and install the
936 `Mac GPG Suite <https://gpgtools.org/macgpg2/>`_.
938 On Linux use your package manager to install gnupg2,
939 gnupg-agent and pinentry-qt, e.g.::
941     sudo apt-get install gnupg2 gnupg-agent pinentry-qt
943 On Linux, you should also configure Git so that it uses gpg2 (gnupg2),
944 otherwise you will get errors mentioning, "unable to open /dev/tty".
945 Set Git's `gpg.program` to `gpg2`::
947     git config --global gpg.program gpg2
949 Configure gpg-agent and a pin-entry program
950 -------------------------------------------
951 On Mac OS X, edit `~/.gnupg/gpg.conf` to include the line,::
953     use-agent
955 This is typically not needed on Linux, where `gpg2` is used, as
956 this is the default value when using `gpg2`.
958 Next, edit `~/.gnupg/gpg-agent.conf` to contain a pinentry-program line
959 pointing to the pinentry program for your platform.
961 The following example `~/.gnupg/gpg-agent.conf` shows how to use
962 pinentry-gtk-2 on Linux::
964     pinentry-program /usr/bin/pinentry-gtk-2
965     default-cache-ttl 3600
967 This following example `.gnupg/gpg-agent.conf` shows how to use MacGPG2's
968 pinentry app on On Mac OS X::
970     pinentry-program /usr/local/MacGPG2/libexec/pinentry-mac.app/Contents/MacOS/pinentry-mac
971     default-cache-ttl 3600
972     enable-ssh-support
973     use-standard-socket
975 Once this has been set up then you will need to reload your gpg-agent config::
977     echo RELOADAGENT | gpg-connect-agent
979 If you see the following output::
981     OK
983 Then the daemon is already running, and you do not need to start it yourself.
985 If it is not running, eval the output of ``gpg-agent --daemon`` in your shell
986 prior to launching `git cola`.::
988     eval $(gpg-agent --daemon)
989     git cola
991 WINDOWS NOTES
992 =============
994 Git Installation
995 ----------------
996 If Git is installed in a custom location, e.g. not installed in `C:/Git` or
997 Program Files, then the path to Git must be configured by creating a file in
998 your home directory `~/.config/git-cola/git-bindir` that points to your git
999 installation.  e.g.::
1001     C:/Tools/Git/bin
1003 LINKS
1004 =====
1006 Git Cola's Git Repository
1007 -------------------------
1008 https://github.com/git-cola/git-cola/
1010 Git Cola Homepage
1011 -----------------
1012 https://git-cola.github.io/
1014 Mailing List
1015 ------------
1016 https://groups.google.com/group/git-cola