1GIT-COLA(1) git-cola GIT-COLA(1)
2
3
4
6 git-cola - The highly caffeinated Git GUI
7
9 git cola [options] [sub-command]
10
12 Git Cola is a sleek and powerful Git GUI.
13
15 --amend
16 Start git cola in amend mode.
17
18 --prompt
19 Prompt for a Git repository. Defaults to the current directory.
20
21 -r, --repo <path>
22 Open the Git repository at <path>. Defaults to the current directory.
23
24 -s, --status-filter <filter>
25 Apply the path filter to the status widget.
26
27 --version
28 Print the git cola version and exit.
29
30 -h, --help
31 Show usage and optional arguments.
32
33 --help-commands
34 Show available sub-commands.
35
37 am
38 Apply patches.
39
40 archive
41 Export tarballs from Git.
42
43 branch
44 Create branches.
45
46 browse
47 Browse tracked files.
48
49 config
50 Configure settings.
51
52 dag
53 Start the git dag Git history browser.
54
55 diff
56 Diff changed files.
57
58 fetch
59 Fetch history from remote repositories.
60
61 grep
62 Use git grep to search for content.
63
64 merge
65 Merge branches.
66
67 pull
68 Fetch and merge remote branches.
69
70 push
71 Push branches to remotes.
72
73 rebase
74 Start an interactive rebase.
75
76 remote
77 Create and edit remotes.
78
79 search
80 Search for commits.
81
82 stash
83 Stash uncommitted modifications.
84
85 tag
86 Create tags.
87
88 version
89 Print the git cola version.
90
92 The editor used by Ctrl-e is configured from the Preferences screen.
93
94 The following environment variables are consulted when no editor is
95 configured. If defined, the first of these variables is used:
96
97 • GIT_VISUAL
98
99 • VISUAL
100
101 • GIT_EDITOR
102
103 • EDITOR
104
105 The *VISUAL variables are consulted before the *EDITOR variables so
106 that you can configure a graphical editor independently of the editor
107 used by the Git CLI.
108
109 ProTip: Configuring your editor to gvim -f -p will open multiple tabs
110 when editing files. gvim -f -o uses splits.
111
112 git cola is {vim, emacs, textpad, notepad++}-aware. When you select a
113 line in the diff or grep screens and press any of Enter, Ctrl-e, or the
114 Edit button, you are taken to that exact line.
115
116 The editor preference is saved in the gui.editor variable using git
117 config.
118
119 The following are some recommend editor configurations.
120
121 • Neovim + Neovim-Qt
122
123 git config --global core.editor nvim
124 git config --global gui.editor 'nvim-qt --nofork'
125
126 • Vim + gvim
127
128 git config --global core.editor vim
129 git config --global gui.editor 'gvim -f'
130
131 • Sublime Text
132
133 git config --global gui.editor 'subl --wait'
134
136 git cola has many useful keyboard shortcuts.
137
138 Many of git cola’s editors understand vim-style hotkeys, eg. {h,j,k,l}
139 for navigating in the diff, status, grep, and file browser widgets.
140
141 {d,u} move down/up one half page at a time (similar to vim’s
142 ctrl-{d,u}). The space and shift-space hotkeys are mapped to the same
143 operations.
144
145 Shift-{j,k,d,u,f,b,page-up,page-down,left,right,up,down} can be be used
146 in the diff editor to select lines while navigating.
147
148 s is a useful hotkey in the diff editor. It stages/unstages the cur‐
149 rent selection when a selection is present. When nothing is selected,
150 the diff hunk at the current text cursor position is staged. This
151 makes it very easy to review changes by selecting good hunks with s
152 while navigating down and over hunks that are not going to be staged.
153
154 Ctrl-u in the diff editor reverts unstaged edits, and respects the se‐
155 lection. This is useful for selectively reverted edits from the work‐
156 tree. This same hotkey reverts the entire file when used from the sta‐
157 tus tool.
158
159 Ctrl-s in the diff editor and status tools stages/unstages the entire
160 file.
161
162 You can see the available shortcuts by pressing pressing the ? key,
163 choosing Help -> Keyboard shortcuts from the main menu, or by consult‐
164 ing the git cola keyboard shortcuts reference.
165
167 The git cola interface is composed of various cooperating tools. Dou‐
168 ble-clicking a tool opens it in its own subwindow. Dragging it around
169 moves and places it within the main window.
170
171 Tools can be hidden and rearranged however you like. git cola care‐
172 fully remembers your window layout and restores it the next time it is
173 launched.
174
175 The Control-{1, 2, 3, …} hotkey gives focus to a specific tool. A hid‐
176 den tool can be re-opened using the Tools menu or the Shift+Control-{1,
177 2, 3, …} shortcut keys.
178
179 The Diff editor can be focused with Ctrl-j. the Status tool can be fo‐
180 cused with Ctrl-k. the Commit tool can be focused with Ctrl-l.
181
183 The Status tool provides a visual analog to the git status command.
184
185 Status displays files that are modified relative to the staging area,
186 staged for the next commit, unmerged files from an in-progress merge,
187 and files that are untracked to git.
188
189 These are the same categories one sees when running git status on the
190 command line.
191
192 You can navigate through the list of files using keyboard arrows as
193 well as the ergonomical and vim-like j and k shortcut keys.
194
195 There are several convenient ways to interact with files in the Status
196 tool.
197
198 Selecting a file displays its diff in the Diff viewer. Double-clicking
199 a file stages its contents, as does the the Ctrl-s shortcut key.
200
201 Ctrl-e opens selected files in the configured editor, and Ctrl-d opens
202 selected files using git difftool
203
204 Additional actions can be performed using the right-click context menu.
205
206 Drag and Drop
207 Files can be dragged from the the Status tool onto other applications.
208
209 Some terminals will treat a drag with multiple files by separating them
210 with newlines, which is less amenable for pasting command-line argu‐
211 ments.
212
213 To avoid this issue, hold down Alt / Option when dragging from the Sta‐
214 tus tool. The drag and drop payload will no longer contain local file
215 URLs – it will contain plain text that is amenable for use on a com‐
216 mand-line.
217
218 Note: if drag and drop is not working and you are on Wayland then you
219 may need to export QT_QPA_PLATFORM=wayland in your environment.
220
221 Actions
222 Clicking the Staged folder shows a diffstat for the index.
223
224 Clicking the Modified folder shows a diffstat for the worktree.
225
226 Clicking individual files sends diffs to the Diff Display.
227
228 Double-clicking individual files adds and removes their content from
229 the index.
230
231 Various actions are available through the right-click context menu.
232 Different actions are available depending a file’s status.
233
234 Stage Selected
235 Add to the staging area using git add Marks unmerged files as resolved.
236
237 Launch Editor
238 Launches the configured visual text editor
239
240 Launch Difftool
241 Visualize changes using git difftool.
242
243 Revert Unstaged Edits
244 Reverts unstaged content by checking out selected paths from the in‐
245 dex/staging area
246
247 Revert Uncommitted Edits
248 Throws away uncommitted edits
249
250 Unstage Selected
251 Remove from the index/staging area with git reset
252
253 Launch Merge Tool
254 Resolve conflicts using git mergetool.
255
256 Delete File(s)
257 Delete untracked files from the filesystem.
258
259 Add to .gitignore
260 Adds untracked files to to the .gitignore file.
261
263 The diff viewer/editor displays diffs for selected files. Additions
264 are shown in green and removals are displayed in light red. Extraneous
265 whitespace is shown with a pure-red background.
266
267 Right-clicking in the diff provides access to additional actions that
268 use either the cursor location or text selection.
269
270 The “Copy Diff” action at Alt + Shift + C copies the selected lines to
271 the clipboard. The +, - and `` `` diff line prefixes are stripped from
272 each line when copying diffs using the “Copy Diff” action.
273
274 Staging content for commit
275 The @@ patterns denote a new diff hunk. Selecting lines of diff and
276 using the Stage Selected Lines command will stage just the selected
277 lines. Clicking within a diff hunk and selecting Stage Diff Hunk
278 stages the entire patch diff hunk.
279
280 The corresponding opposite commands can be performed on staged files as
281 well, e.g. staged content can be selectively removed from the index
282 when we are viewing diffs for staged content.
283
284 Diff Against Commit (Diff Mode)
285 Diff Mode allows you to selectively unstage and revert edits from arbi‐
286 trary commits so that you can bring these edits back into your work‐
287 tree.
288
289 You can use the diff editor to unstage edits against arbitrary commits
290 by using the Diff > Against Commit... (Diff Mode) menu action.
291
292 You can exit Diff Mode by clicking on the red circle-slash icon on the
293 Status widget, by using the Diff > Exit Diff mode menu action, or by
294 clicking in an empty area in the Status tool.
295
297 The commit message editor is a simple text widget for entering commit
298 messages.
299
300 You can navigate between the Subject and Extended description… fields
301 using the keyboard arrow keys.
302
303 Pressing enter when inside the Subject field jumps down to the extended
304 description field.
305
306 The Options button menu to the left of the subject field provides ac‐
307 cess to the additional actions.
308
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 staged
311 content.
312
313 Sign Off
314 The Sign Off button adds a standard:
315
316 Signed-off-by: A. U. Thor <a.u.thor@example.com>
317
318 line to the bottom of the commit message.
319
320 Invoking this action is equivalent to passing the -s option to git com‐
321 mit.
322
323 Commit
324 The commit button runs git commit. The contents of the commit message
325 editor is provided as the commit message.
326
327 Only staged files are included in the commit – this is the same behav‐
328 ior as running git commit on the command-line.
329
330 Line and Column Display
331 The current line and column number is displayed by the editor. E.g. a
332 5,0 display means that the cursor is located at line five, column zero.
333
334 The display changes colors when lines get too long. Yellow indicates
335 the safe boundary for sending patches to a mailing list while keeping
336 space for inline reply markers.
337
338 Orange indicates that the line is starting to run a bit long and should
339 break soon.
340
341 Red indicates that the line is running up against the standard 80-col‐
342 umn limit for commit messages.
343
344 Keeping commit messages less than 76-characters wide is encouraged.
345 git log is a great tool but long lines mess up its formatting for ev‐
346 eryone else, so please be mindful when writing commit messages.
347
348 Amend Last Commit
349 Clicking on Amend Last Commit makes git cola amend the previous commit
350 instead of creating a new one. git cola loads the previous commit mes‐
351 sage into the commit message editor when this option is selected.
352
353 The Status tool will display all of the changes for the amended commit.
354
355 Create Signed Commit
356 Tell git commit and git merge to sign commits using GPG.
357
358 Using this option is equivalent to passing the --gpg-sign option to git
359 commit and git merge.
360
361 This option’s default value can be configured using the cola.signcom‐
362 mits configuration variable.
363
364 Prepare Commit Message
365 The Commit -> Prepare Commit Message action or Ctrl-Shift-Return key‐
366 board shortcut runs the cola-prepare-commit-msg hook if it is available
367 in .git/hooks/. This is a git cola-specific hook that takes the same
368 parameters as Git’s prepare-commit-msg hook
369
370 The hook is passed the path to .git/GIT_COLA_MSG as the first argument
371 and the hook is expected to write an updated commit message to speci‐
372 fied path. After running this action, the commit message editor is up‐
373 dated with the new commit message.
374
375 To override the default path to this hook set the cola.prepareCom‐
376 mitMessageHook git config variable to the path to the hook script.
377 This is useful if you would like to use a common hook across all repos‐
378 itories.
379
381 The Branches tool provides a visual tree to navigate through the
382 branches. The tree has three main nodes Local Branch, Remote Branch
383 and Tags. Branches are grouped by their name divided by the character
384 ‘/’.Ex:
385
386 branch/feature/foo
387 branch/feature/bar
388 branch/doe
389
390 Will produce:
391
392 branch
393 - doe
394 + feature
395 - bar
396 - foo
397
398 Current branch will display a star icon. If current branch has commits
399 ahead/behind it will display an up/down arrow with its number.
400
401 Actions
402 Various actions are available through the right-click context menu.
403 Different actions are available depending of selected branch status.
404
405 Checkout
406 The checkout action runs git checkout [<branchname>].
407
408 Merge in current branch
409 The merge action runs git merge –no-commit [<branchname>].
410
411 Pull
412 The pull action runs git pull –no-ff [<remote>] [<branchname>].
413
414 Push
415 The push action runs git push [<remote>] [<branchname>].
416
417 Rename Branch
418 The rename branch action runs git branch -M [<branchname>].
419
420 Delete Branch
421 The delete branch branch action runs git branch -D [<branchname>].
422
423 Delete Remote Branch
424 The remote branch action runs git push –delete [<remote>] [<branch‐
425 name>].
426
428 Use the File -> Apply Patches menu item to begin applying patches.
429
430 Dragging and dropping patches onto the git cola interface adds the
431 patches to the list of patches to apply using git am.
432
433 You can drag either a set of patches or a directory containing patches.
434 Patches can be sorted using in the interface and are applied in the
435 same order as is listed in the list.
436
437 When a directory is dropped git cola walks the directory tree in search
438 of patches. git cola sorts the list of patches after they have all
439 been found. This allows you to control the order in which patches are
440 applied by placing patchsets into alphanumerically-sorted directories.
441
443 git cola remembers modifications to the layout and arrangement of tools
444 within the git cola interface. Changes are saved and restored at ap‐
445 plication shutdown/startup.
446
447 git cola can be configured to not save custom layouts by unsetting the
448 Save Window Settings option in the git cola preferences.
449
451 Git Cola contains a default theme which follows the current Qt style
452 and a handful of built-in color themes. See cola.theme for more de‐
453 tails.
454
455 To use icons appropriate for a dark application theme, configure git
456 config --global cola.icontheme dark to use the dark icon theme. See
457 cola.icontheme for more details.
458
459 On macOS, using the default theme will automatically inherit “Dark
460 Mode” color themes when configured via System Preferences. You will
461 need to configure the dark icon theme as noted above when dark mode is
462 enabled.
463
464 On Linux, you may want Qt to follow the Window manager theme by config‐
465 uring it to do so using the qt5ct Qt5 configuration tool. Install
466 qt5ct on Debian/Ubuntu systems to make this work.:
467
468 sudo apt install qt5ct
469
470 Once installed, update your ~/.bash_profile to activate qt5ct:
471
472 # Use the style configured using the qt5ct tool
473 export QT_QPA_PLATFORMTHEME=qt5ct
474
475 This only work with the default theme. The other themes replace the
476 color palette with theme-specific colors.
477
478 Some systems may require that you override QT_STYLE_OVERRIDE in order
479 to use a dark theme or to better interact with the Desktop environment.
480 Some systems provide a theme that you can install:
481
482 sudo apt-get install adwaita-qt
483
484 You can activate the theme using the following environment variable:
485
486 # Override the default theme to adwaita-dark
487 export QT_STYLE_OVERRIDE=adwaita-dark
488
489 QT_STYLE_OVERRIDE may already be set in your Desktop Environment, so
490 check that variable for reference if you get unexpected hangs when
491 launching git-cola or when the default theme does not follow the desk‐
492 top’s theme on Linux.
493
494 If you don’t want to set this variable globally then you can set it
495 when launching cola from the command-line:
496
497 QT_STYLE_OVERRIDE=adwaita-dark git cola
498
499 The following is a user-contributed custom git-cola.desktop file that
500 can be used to launch Git Cola with these settings preset for you:
501
502 [Desktop Entry]
503 Name=Git Cola (dark)
504 Comment=The highly caffeinated Git GUI
505 TryExec=git-cola
506 Exec=env QT_STYLE_OVERRIDE=adwaita-dark git-cola --prompt --icon-theme dark
507 Icon=git-cola
508 StartupNotify=true
509 Terminal=false
510 Type=Application
511 Categories=Development;RevisionControl;
512 X-KDE-SubstituteUID=false
513
514 You may also want to customize the diff colors when using a dark theme:
515
516 git config --global cola.color.add 86c19f
517 git config --global cola.color.remove c07067
518
519 Please see #760 for more details.
520
521 Custom Themes
522 To create your own custom theme for Git Cola just create a QSS file and
523 put it in ~/.config/themes/. You can add as many files as you want.
524 Each file will become an option in Menu -> File -> Preferences -> Ap‐
525 pearance -> GUI theme.
526
527 Some examples can be found here Qt Style Sheets Examples.
528
530 These variables can be set using git config or from the settings.
531
532 cola.autocompletepaths
533 Set to false to disable auto-completion of filenames in completion wid‐
534 gets. This can speed up operations when working in large repositories.
535 Defaults to true.
536
537 cola.autoloadCommitTemplate
538 Set to true to automatically load the commit template in the commit
539 message editor If the commit.template variable has not been configured,
540 raise the corresponding error. Defaults to false.
541
542 cola.blameviewer
543 The command used to blame files. Defaults to git gui blame.
544
545 cola.blockcursor
546 Whether to use a “block” cursor in diff editors. The block cursor is
547 easier to see compared to a line cursor. Set to false to use a thin
548 “line” cursor. Defauls to true.
549
550 cola.browserdockable
551 Whether to create a dock widget with the Browser tool. Defaults to
552 false to speedup startup time.
553
554 cola.checkconflicts
555 Inspect unmerged files for conflict markers before staging them. This
556 feature helps prevent accidental staging of unresolved merge conflicts.
557 Defaults to true.
558
559 cola.defaultrepo
560 git cola, when run outside of a Git repository, prompts the user for a
561 repository. Set cola.defaultrepo to the path of a Git repository to
562 make git cola attempt to use that repository before falling back to
563 prompting the user for a repository.
564
565 cola.dictionary
566 Specifies an additional dictionary for git cola to use in its spell
567 checker. This should be configured to the path of a newline-separated
568 list of words.
569
570 By default, git cola searches for dict/words and dict/propernames dic‐
571 tionary files in ~/.local/share and $XDG_DATA_DIRS.
572
573 If $XDG_DATA_DIRS is undefined or set to an empty value then /usr/lo‐
574 cal/share and /usr/share are searched for dictionary files.
575
576 Dictionary files are newline-separated and contain one word per line.
577
578 cola.expandtab
579 Expand tabs into spaces in the commit message editor. When set to
580 true, git cola will insert a configurable number of spaces when tab is
581 pressed. The number of spaces is determined by cola.tabwidth. De‐
582 faults to false.
583
584 cola.gravatar
585 Use the gravatar.com service to lookup icons for author emails. Gra‐
586 vatar icons work by sending an MD5 hash of an author’s email to gra‐
587 vatar.com when requesting an icon. Warning: this feature can leak in‐
588 formation. Network requests to gravatar.com are disabled when set to
589 false. Defaults to true.
590
591 cola.fileattributes
592 Enables per-file gitattributes encoding and binary file support. This
593 tells git cola to honor the configured encoding when displaying and ap‐
594 plying diffs.
595
596 A .gitattributes file can set the binary attribute in order to force
597 specific untracked paths to be treated as binary files when diffing.
598 Binary files are displayed using a hexdump display.
599
600 # Treat *.exr files as binary files.
601 *.exr binary
602
603 cola.fontdiff
604 Specifies the font to use for git cola’s diff display.
605
606 cola.hidpi
607 Specifies the High DPI displays scale factor. Set 0 to automatically
608 scaled. Setting value between 0 and 1 is undefined. This option re‐
609 quires at least Qt 5.6 to work. See Qt QT_SCALE_FACTOR documentation
610 for more information.
611
612 cola.icontheme
613 Specifies the icon themes to use throughout git cola. The theme speci‐
614 fied must be the name of the subdirectory containing the icons, which
615 in turn must be placed in the inside the main “icons” directory in git
616 cola’s installation prefix.
617
618 If unset, or set either “light” or “default”, then the default style
619 will be used. If set to “dark” then the built-in “dark” icon theme,
620 which is suitable for a dark window manager theme, will be used.
621
622 If set to an absolute directory path then icons in that directory will
623 be used. This value can be set to multiple values using, git config
624 --add cola.icontheme $theme.
625
626 This setting can be overridden by the GIT_COLA_ICON_THEME environment
627 variable, which can specify multiple themes using a colon-separated
628 value.
629
630 The icon theme can also be specified by passing --icon-theme=<theme> on
631 the command line, once for each icon theme, in the order that they
632 should be searched. This can be used to override a subset of the
633 icons, and fallback to the built-in icons for the remainder.
634
635 cola.imagediff.[extension]
636 Enable image diffs for the specified file extension. For example, con‐
637 figuring git config –global cola.imagediff.svg false will disable use
638 of the visual image diff for .svg files in all repos until is is ex‐
639 plicitly toggled on. Defaults to true.
640
641 cola.inotify
642 Set to false to disable file system change monitoring. Defaults to
643 true, but also requires either Linux with inotify support or Windows
644 with pywin32 installed for file system change monitoring to actually
645 function.
646
647 cola.refreshonfocus
648 Set to true to automatically refresh when git cola gains focus. De‐
649 faults to false because this can cause a pause whenever switching to
650 git cola from another application.
651
652 cola.linebreak
653 Whether to automatically break long lines while editing commit mes‐
654 sages. Defaults to true. This setting is configured using the Prefer‐
655 ences dialog, but it can be toggled for one-off usage using the commit
656 message editor’s options sub-menu.
657
658 cola.maxrecent
659 git cola caps the number of recent repositories to avoid cluttering the
660 start and recent repositories menu. The maximum number of repositories
661 to remember is controlled by cola.maxrecent and defaults to 8.
662
663 cola.mousezoom
664 Controls whether zooming text using Ctrl + MouseWheel scroll is en‐
665 abled. Set to false to disable scrolling with the mouse wheel. De‐
666 fauls to `true.
667
668 cola.dragencoding
669 git cola encodes paths dragged from its widgets into utf-16 when adding
670 them to the drag-and-drop mime data (specifically, the text/x-moz-url
671 entry). utf-16 is used to make gnome-terminal see the right paths, but
672 other terminals may expect a different encoding. If you are using a
673 terminal that expects a modern encoding, e.g. terminator, then set this
674 value to utf-8.
675
676 cola.readsize
677 git cola avoids reading large binary untracked files. The maximum size
678 to read is controlled by cola.readsize and defaults to 2048.
679
680 cola.resizebrowsercolumns
681 git cola will automatically resize the file browser columns as folders
682 are expanded/collapsed when cola.resizebrowsercolumns is set to true.
683
684 cola.safemode
685 The “Stage” button in the git cola Actions panel stages all files when
686 it is activated and no files are selected. This can be problematic if
687 it is accidentally triggered after carefully preparing the index with
688 staged changes. “Safe Mode” is enabled by setting cola.safemode to
689 true. When enabled, git cola will do nothing when “Stage” is activated
690 without a selection. Defaults to false.
691
692 cola.savewindowsettings
693 git cola will remember its window settings when set to true. Window
694 settings and X11 sessions are saved in $HOME/.config/git-cola.
695
696 cola.showpath
697 git cola displays the absolute path of the repository in the window ti‐
698 tle. This can be disabled by setting cola.showpath to false. Defaults
699 to true.
700
701 cola.signcommits
702 git cola will sign commits by default when set true. Defaults to false.
703 See the section below on setting up GPG for more details.
704
705 cola.startupmode
706 Control how the list of repositories is displayed in the startup dia‐
707 log. Set to list to view the list of repositories as a list, or folder
708 to view the list of repositories as a collection of folder icons. De‐
709 faults to list.
710
711 cola.statusindent
712 Set to true to indent files in the Status widget. Files in the Staged,
713 Modified, etc. categories will be grouped in a tree-like structure.
714 Defaults to false.
715
716 cola.statusshowtotals
717 Set to true to display files counts in the Status widget’s category ti‐
718 tles. Defaults to false.
719
720 cola.tabwidth
721 The number of columns occupied by a tab character. Defaults to 8.
722
723 cola.terminal
724 The command to use when launching commands within a graphical terminal.
725
726 cola.terminal defaults to xterm -e when unset. e.g. when opening a
727 shell, git cola will run xterm -e $SHELL.
728
729 git cola has built-in support for xterm, gnome-terminal, konsole. If
730 either gnome-terminal, xfce4-terminal, or konsole are installed then
731 they will be preferred over xterm when cola.terminal is unset.
732
733 The table below shows the built-in values that are used for the respec‐
734 tive terminal. You can force the use of a specific terminal by config‐
735 uring cola accordingly.
736
737 cola.terminalshellquote
738 Some terminal require that the command string get passed as a string.
739 For example, xfce4-terminal -e "git difftool" requires shell quoting,
740 whereas gnome-terminal -- git difftool does not.
741
742 You should not need to set this variable for the built-in terminals
743 cola knows about – it will behave correctly without configuration. For
744 example, when unconfigured, cola already knows that xfce4-terminal re‐
745 quires shell quoting.
746
747 This configuration variable is for custom terminals outside of the
748 builtin set. The table below shows the builtin configuration.
749
750 ┌───────────────┬───────────────────┬────────────────────┐
751 │Terminal │ cola.terminal │ cola.terminalshel‐ │
752 │ │ │ lquote │
753 ├───────────────┼───────────────────┼────────────────────┤
754 │gnome-terminal │ gnome-terminal -- │ false │
755 ├───────────────┼───────────────────┼────────────────────┤
756 │konsole │ konsole -e │ false │
757 ├───────────────┼───────────────────┼────────────────────┤
758 │xfce4-terminal │ xfce4-terminal -e │ true │
759 ├───────────────┼───────────────────┼────────────────────┤
760 │xterm │ xterm -e │ false │
761 └───────────────┴───────────────────┴────────────────────┘
762
763 cola.textwidth
764 The number of columns used for line wrapping. Tabs are counted accord‐
765 ing to cola.tabwidth.
766
767 cola.theme
768 Specifies the GUI theme to use throughout git cola. The theme specified
769 must be one of the following values:
770
771 • default – default Qt theme, may appear different on various systems
772
773 • flat-dark-blue
774
775 • flat-dark-green
776
777 • flat-dark-grey
778
779 • flat-dark-red
780
781 • flat-light-blue
782
783 • flat-light-green
784
785 • flat-light-grey
786
787 • flat-light-red
788
789 If unset, or set to an invalid value, then the default style will be
790 used. The default theme is generated by Qt internal engine and should
791 look native but may look noticeably different on different platforms.
792 The flat themes on the other hand should look similar (but not identi‐
793 cal) on various systems.
794
795 The GUI theme can also be specified by passing --theme=<name> on the
796 command line.
797
798 cola.turbo
799 Set to true to enable “turbo” mode. “Turbo” mode disables some fea‐
800 tures that can slow things down when operating on huge repositories.
801 “Turbo” mode will skip loading Git commit messages, author details,
802 status information, and commit date details in the File Browser tool.
803 Defaults to false.
804
805 cola.color.text
806 The default diff text color, in hexadecimal #RRGGBB notation. Defaults
807 to “#030303”:
808
809 git config cola.color.text '#030303'
810
811 cola.color.add
812 The default diff “add” background color, in hexadecimal #RRGGBB nota‐
813 tion. Defaults to “#d2ffe4”:
814
815 git config cola.color.add '#d2ffe4'
816
817 cola.color.remove
818 The default diff “remove” background color, in hexadecimal #RRGGBB no‐
819 tation. Defaults to “#fee0e4”:
820
821 git config cola.color.remove '#fee0e4'
822
823 cola.color.header
824 The default diff header text color, in hexadecimal #RRGGBB notation.
825 Defaults to “#bbbbbb”:
826
827 git config cola.color.header '#bbbbbb'
828
829 core.hooksPath
830 Hooks are programs you can place in a hooks directory to trigger ac‐
831 tions at certain points in git’s execution. Hooks that don’t have the
832 executable bit set are ignored.
833
834 By default the hooks directory is $GIT_DIR/hooks, but that can be
835 changed via the core.hooksPath configuration variable
836
837 The cola-prepare-commit-msg hook functionality and Cola’s Git LFS de‐
838 tection honors this configuration.
839
840 Please see the git hooks documentation for more details.
841
842 gui.diffcontext
843 The number of diff context lines to display.
844
845 gui.displayuntracked
846 git cola avoids showing untracked files when set to false.
847
848 gui.editor
849 The default text editor to use is defined in gui.editor. The config
850 variable overrides the VISUAL environment variable. e.g. gvim -f -p.
851
852 gui.historybrowser
853 The history browser to use when visualizing history. Defaults to gitk.
854
855 diff.tool
856 The default diff tool to use.
857
858 merge.tool
859 The default merge tool to use.
860
861 user.email
862 Your email address to be recorded in any newly created commits. Can be
863 overridden by the ‘GIT_AUTHOR_EMAIL’, ‘GIT_COMMITTER_EMAIL’, and
864 ‘EMAIL’ environment variables.
865
866 user.name
867 Your full name to be recorded in any newly created commits. Can be
868 overridden by the ‘GIT_AUTHOR_NAME’ and ‘GIT_COMMITTER_NAME’ environ‐
869 ment variables.
870
872 GIT_COLA_ICON_THEME
873 When set in the environment, GIT_COLA_ICON_THEME overrides the theme
874 specified in the cola.icontheme configuration. Read cola.icontheme for
875 more details.
876
877 GIT_COLA_SCALE
878 IMPORTANT:
879 GIT_COLA_SCALE should not be used with newer versions of Qt.
880
881 Set QT_AUTO_SCREEN_SCALE_FACTOR to 1 and Qt will automatically scale
882 the interface to the correct size based on the display DPI. This
883 option is also available by setting cola.hidpi configuration.
884
885 See the Qt High DPI documentation for more details.
886
887 git cola can be made to scale its interface for HiDPI displays. When
888 defined, git cola will scale icons, radioboxes, and checkboxes accord‐
889 ing to the scale factor. The default value is 1. A good value is 2
890 for high-resolution displays.
891
892 Fonts are not scaled, as their size can already be set in the settings.
893
894 GIT_COLA_TRACE
895 When defined, git cola logs git commands to stdout. When set to full,
896 git cola also logs the exit status and output. When set to trace, git
897 cola logs to the Console widget.
898
899 VISUAL
900 Specifies the default editor to use. This is ignored when the gui.edi‐
901 tor configuration variable is defined.
902
904 git cola automatically detects your language and presents some transla‐
905 tions when available. This may not be desired, or you may want git
906 cola to use a specific language.
907
908 You can make git cola use an alternative language by creating a ~/.con‐
909 fig/git-cola/language file containing the standard two-letter gettext
910 language code, e.g. “en”, “de”, “ja”, “zh”, etc.:
911
912 mkdir -p ~/.config/git-cola &&
913 echo en >~/.config/git-cola/language
914
915 Alternatively you may also use LANGUAGE environmental variable to tem‐
916 porarily change git cola’s language just like any other gettext-based
917 program. For example to temporarily change git cola’s language to Eng‐
918 lish:
919
920 LANGUAGE=en git cola
921
922 To make git cola use the zh_TW translation with zh_HK, zh, and en as a
923 fallback.:
924
925 LANGUAGE=zh_TW:zh_HK:zh:en git cola
926
928 git cola allows you to define custom GUI actions by setting git config
929 variables. The “name” of the command appears in the “Actions” menu.
930
931 guitool.<name>.cmd
932 Specifies the shell command line to execute when the corresponding item
933 of the Tools menu is invoked. This option is mandatory for every tool.
934 The command is executed from the root of the working directory, and in
935 the environment it receives the name of the tool as GIT_GUITOOL, the
936 name of the currently selected file as FILENAME, and the name of the
937 current branch as CUR_BRANCH (if the head is detached, CUR_BRANCH is
938 empty).
939
940 If <name> contains slashes (/) then the leading part of the name, up
941 until the final slash, is treated like a path of submenus under which
942 the actions will be created.
943
944 For example, configuring guitool.Commands/Util/echo.cmd creates a Com‐
945 mands menu inside the top-level Actions menu, a Util menu inside the
946 Commands menu and an echo action inside the Commands submenu.
947
948 guitool.<name>.background
949 Run the command in the background (similar to editing and difftool ac‐
950 tions). This avoids blocking the GUI. Setting background to true im‐
951 plies noconsole and norescan.
952
953 guitool.<name>.needsfile
954 Run the tool only if a diff is selected in the GUI. It guarantees that
955 FILENAME is not empty.
956
957 guitool.<name>.noconsole
958 Run the command silently, without creating a window to display its out‐
959 put.
960
961 guitool.<name>.norescan
962 Don’t rescan the working directory for changes after the tool finishes
963 execution.
964
965 guitool.<name>.confirm
966 Show a confirmation dialog before actually running the tool.
967
968 guitool.<name>.argprompt
969 Request a string argument from the user, and pass it to the tool
970 through the ARGS environment variable. Since requesting an argument im‐
971 plies confirmation, the confirm option has no effect if this is en‐
972 abled. If the option is set to true, yes, or 1, the dialog uses a
973 built-in generic prompt; otherwise the exact value of the variable is
974 used.
975
976 guitool.<name>.revprompt
977 Request a single valid revision from the user, and set the REVISION en‐
978 vironment variable. In other aspects this option is similar to arg‐
979 prompt, and can be used together with it.
980
981 guitool.<name>.revunmerged
982 Show only unmerged branches in the revprompt subdialog. This is useful
983 for tools similar to merge or rebase, but not for things like checkout
984 or reset.
985
986 guitool.<name>.title
987 Specifies the title to use for the prompt dialog. Defaults to the tool
988 name.
989
990 guitool.<name>.prompt
991 Specifies the general prompt string to display at the top of the dia‐
992 log, before subsections for argprompt and revprompt. The default value
993 includes the actual command.
994
995 guitool.<name>.shortcut
996 Specifies a keyboard shortcut for the custom tool.
997
998 The value must be a valid string understood by the QAction::setShort‐
999 cut() API. See
1000 http://qt-project.org/doc/qt-4.8/qkeysequence.html#QKeySequence-2 for
1001 more details about the supported values.
1002
1003 Avoid creating shortcuts that conflict with existing built-in git cola
1004 shortcuts. Creating a conflict will result in no action when the
1005 shortcut is used.
1006
1008 When creating signed commits, gpg will attempt to read your password
1009 from the terminal from which git cola was launched. The way to make
1010 this work smoothly is to use a GPG agent so that you can avoid needing
1011 to re-enter your password every time you commit.
1012
1013 This also gets you a graphical passphrase prompt instead of getting
1014 prompted for your password in the terminal.
1015
1016 Install gpg-agent and friends
1017 On Mac OS X, you may need to brew install gpg-agent and install the Mac
1018 GPG Suite.
1019
1020 On Linux use your package manager to install gnupg2, gnupg-agent and
1021 pinentry-qt, e.g.:
1022
1023 sudo apt-get install gnupg2 gnupg-agent pinentry-qt
1024
1025 On Linux, you should also configure Git so that it uses gpg2 (gnupg2),
1026 otherwise you will get errors mentioning, “unable to open /dev/tty”.
1027 Set Git’s gpg.program to gpg2:
1028
1029 git config --global gpg.program gpg2
1030
1031 Configure gpg-agent and a pin-entry program
1032 On Mac OS X, edit ~/.gnupg/gpg.conf to include the line,:
1033
1034 use-agent
1035
1036 This is typically not needed on Linux, where gpg2 is used, as this is
1037 the default value when using gpg2.
1038
1039 Next, edit ~/.gnupg/gpg-agent.conf to contain a pinentry-program line
1040 pointing to the pinentry program for your platform.
1041
1042 The following example ~/.gnupg/gpg-agent.conf shows how to use pinen‐
1043 try-gtk-2 on Linux:
1044
1045 pinentry-program /usr/bin/pinentry-gtk-2
1046 default-cache-ttl 3600
1047
1048 This following example .gnupg/gpg-agent.conf shows how to use MacGPG2’s
1049 pinentry app on On Mac OS X:
1050
1051 pinentry-program /usr/local/MacGPG2/libexec/pinentry-mac.app/Contents/MacOS/pinentry-mac
1052 default-cache-ttl 3600
1053 enable-ssh-support
1054 use-standard-socket
1055
1056 Once this has been set up then you will need to reload your gpg-agent
1057 config:
1058
1059 echo RELOADAGENT | gpg-connect-agent
1060
1061 If you see the following output:
1062
1063 OK
1064
1065 Then the daemon is already running, and you do not need to start it
1066 yourself.
1067
1068 If it is not running, eval the output of gpg-agent --daemon in your
1069 shell prior to launching git cola.:
1070
1071 eval $(gpg-agent --daemon)
1072 git cola
1073
1075 Git Installation
1076 If Git is installed in a custom location, e.g. not installed in C:/Git
1077 or Program Files, then the path to Git must be configured by creating a
1078 file in your home directory ~/.config/git-cola/git-bindir that points
1079 to your git installation. e.g.:
1080
1081 C:/Tools/Git/bin
1082
1083 SSH Agents for Key-based Authentication
1084 You may need to setup ssh-agent in order to use SSH key-based authenti‐
1085 cation on Windows. It has been reported that starting OpenSSH agent in
1086 Windows Services and adding the key using Powershell are necessary in
1087 order to get things working.
1088
1089 Please see the following links for more details.
1090
1091 https://stackoverflow.com/questions/18683092/how-to-run-ssh-add-on-windows
1092
1094 FIPS Security Mode is available in newer versions of Python. These in‐
1095 clude Python 3.9+ and the patched Python 3.6 used by CentOS8/RHEL8 (and
1096 possibly others).
1097
1098 Git Cola uses the hashlib.md5 function and adheres to the FIPS security
1099 mode when available. Git Cola does not use the MD5 value for security
1100 purposes. MD5 is used only for the purposes of implementing the
1101 cola/gravatar.py Gravatar client.
1102
1104 Git Cola’s Git Repository
1105 https://github.com/git-cola/git-cola/
1106
1107 Git Cola Homepage
1108 https://git-cola.github.io/
1109
1110 Mailing List
1111 https://groups.google.com/group/git-cola
1112
1114 David Aguilar and contributors
1115
1117 2007-2023, David Aguilar and contributors
1118
1119
1120
1121
11224.2.1 Jun 16, 2023 GIT-COLA(1)