GitLab keyboard shortcuts

Tier: Free, Premium, Ultimate Offering: GitLab.com, Self-managed, GitLab Dedicated

GitLab has several keyboard shortcuts you can use to access its different features.

To display a window in GitLab that lists its keyboard shortcuts, use one of the following methods:

  • Press ?.
  • In the lower-left corner of the application, select Help and then Keyboard shortcuts.

Although global shortcuts work from any area of GitLab, you must be in specific pages for the other shortcuts to be available, as explained in each section.

Global shortcuts

These shortcuts are available in most areas of GitLab:

Keyboard shortcut Description
? Show or hide the shortcut reference sheet.
Shift + p Go to your Projects page.
Shift + g Go to your Groups page.
Shift + a Go to your Activity page.
Shift + l Go to your Milestones page.
Shift + s Go to your Snippets page.
s / / Put cursor in the search bar.
Shift + i Go to your Issues page.
Shift + m Go to your Merge requests page.
Shift + r Go to your Review requests page.
Shift + t Go to your To-Do List page.
p, then b Show or hide the Performance Bar.
Escape Hide tooltips or popovers.
g, then x Toggle between GitLab and GitLab Next (GitLab SaaS only).
. Open the Web IDE.

Additionally, the following shortcuts are available when editing text in text fields (for example, comments, replies, issue descriptions, and merge request descriptions):

macOS shortcut Windows shortcut Description
Edit your last comment. You must be in a blank text field below a thread, and you must already have at least one comment in the thread.
Command + Shift + p Control + Shift + p Toggle Markdown preview when editing text in a text field that has Write and Preview tabs at the top.
Command + b Control + b Bold the selected text (surround it with **).
Command + i Control + i Italicize the selected text (surround it with _).
Command + Shift + x Control + Shift + x Strike through the selected text (surround it with ~~).
Command + k Control + k Add a link (surround the selected text with []()).
Command + ] Control + ] Indent text. Introduced in GitLab 15.3.
Command + [ Control + [ Outdent text. Introduced in GitLab 15.3.
Command + Enter Control + Enter Submit or save changes

The shortcuts for editing in text fields are always enabled, even if other keyboard shortcuts are disabled.

Project

These shortcuts are available from any page in a project. You must type them relatively quickly to work, and they take you to another page in the project.

Keyboard shortcut Description
g + o Go to the Project overview page.
g + v Go to the project Activity page (Manage > Activity).
g + r Go to the project Releases page (Deploy > Releases).
g + f Go to the project files (Code > Repository).
t Open the project file search dialog. (Code > Repository, select Find Files).
g + c Go to the project Commits page (Code > Commits).
g + n Go to the Repository graph page (Code > Repository graph).
g + d Go to the charts in the Repository analytics page (Analyze > Repository analytics).
g + i Go to the project Issues page (Plan > Issues).
i Go to the New Issue page (Plan > Issues, select New issue ).
g + b Go to the project Issue boards page (Plan > Issue boards).
g + m Go to the project Merge requests page (Code > Merge requests).
g + p Go to the CI/CD Pipelines page (Build > Pipelines).
g + j Go to the CI/CD Jobs page (Build > Jobs).
g + e Go to the project Environments page (Operate > Environments).
g + k Go to the project Kubernetes clusters integration page (Operate > Kubernetes clusters). You must have at least maintainer permissions to access this page.
g + s Go to the project Snippets page (Code > Snippets).
g + w Go to the project wiki (Plan > Wiki), if enabled.
. Open the Web IDE.

Issues

These shortcuts are available when viewing issues:

Keyboard shortcut Description
e Edit description.
a Change assignee.
m Change milestone.
l Change label.
c + r Copy issue reference.
r Start writing a comment. Pre-selected text is quoted in the comment.
Go to the next design.
Go to the previous design.
Escape Close the design.

Merge requests

These shortcuts are available when viewing merge requests:

macOS shortcut Windows shortcut Description
] or j   Move to next file.
[ or k   Move to previous file.
Command + p Control + p Search for, and then jump to a file for review.
n   Move to next unresolved discussion.
p   Move to previous unresolved discussion.
b   Copy source branch name.
c + r   Copy merge request reference.
r   Start writing a comment. Pre-selected text is quoted in the comment.
Shift + Command + Enter Shift + Control + Enter Publish your comment immediately.
Command + Enter Control + Enter Add your comment in a pending state, as part of a review.
c   Move to next commit.
x   Move to previous commit.
f   Toggle file browser.

Project files

These shortcuts are available when browsing the files in a project (go to Code > Repository):

Keyboard shortcut Description
Move selection up (only while searching for files, Code > Repository, then select Find File).
Move selection down (only while searching for files, Code > Repository, then select Find File).
Enter Open selection (only while searching for files, Code > Repository, then select Find File).
Escape Go back to the Find File screen (only while searching for files, Code > Repository, then select Find File).
y Go to file permalink (only while viewing a file).
. Open the Web IDE.

Repository graph

These shortcuts are available when viewing the project repository graph page (go to Code > Repository graph):

Keyboard shortcut Description
or h Scroll left.
or l Scroll right.
or k Scroll up.
or j Scroll down.
Shift + or Shift + k Scroll to top.
Shift + or Shift + j Scroll to bottom.

Incidents

These shortcuts are available when viewing incidents:

Keyboard shortcut Description
c + r Copy incident reference.

Wiki pages

This shortcut is available when viewing a wiki page:

Keyboard shortcut Description
e Edit wiki page.

Rich text editor

These shortcuts are available when editing a file with the rich text editor:

macOS shortcut Windows shortcut Description
Command + c Control + c Copy
Command + x Control + x Cut
Command + v Control + v Paste
Command + Shift + v Control + Shift + v Paste without formatting
Command + z Control + z Undo
Command + Shift + v Control + Shift + v Redo
Shift + Enter Shift + Enter Add a line break

Formatting

macOS shortcut Windows/Linux shortcut Description
Command + b Control + b Bold
Command + i Control + i Italic
Command + Shift + x Control + Shift + x Strikethrough
Command + k Control + k Insert a link
Command + Option + 0 Control + Alt + 0 Apply normal text style
Command + Option + 1 Control + Alt + 1 Apply heading style 1
Command + Option + 2 Control + Alt + 2 Apply heading style 2
Command + Option + 3 Control + Alt + 3 Apply heading style 3
Command + Option + 4 Control + Alt + 4 Apply heading style 4
Command + Option + 5 Control + Alt + 5 Apply heading style 5
Command + Option + 6 Control + Alt + 6 Apply heading style 6
Command + Shift + 7 Control + Shift + 7 Ordered list
Command + Shift + 8 Control + Shift + 8 Unordered list
Command + Shift + 9 Control + Shift + 9 Task list
Command + Option + c Control + Alt + c Code block
Command + Shift + h Control + Shift + h Highlight
Command + , Control + , Subscript
Command + . Control + . Superscript
Tab Tab Indent list
Shift + Tab Shift + Tab Outdent list

Text selection

macOS shortcut Windows shortcut Description
Command + a Control + a Select all
Shift + Shift + Extend selection one character to left
Shift + Shift + Extend selection one character to right
Shift + Shift + Extend selection one line up
Shift + Shift + Extend selection one line down
Command + Shift + Control + Shift + Extend selection to the beginning of the document
Command + Shift + Control + Shift + Extend selection to the end of the document

Epics

Tier: Premium, Ultimate Offering: GitLab.com, Self-managed, GitLab Dedicated

These shortcuts are available when viewing epics:

Keyboard shortcut Description
e Edit description.
l Change label.
c + r Copy epic reference.

Disable keyboard shortcuts

History
  • Moved from the shortcuts page to user preferences in GitLab 16.4.

To disable keyboard shortcuts:

  1. On the left sidebar, select your avatar.
  2. Select Preferences.
  3. In the Behavior section, clear the Enable keyboard shortcuts checkbox.
  4. Select Save changes.

Enable keyboard shortcuts

History
  • Moved from the shortcuts page to user preferences in GitLab 16.4.

To enable keyboard shortcuts:

  1. On the left sidebar, select your avatar.
  2. Select Preferences.
  3. In the Behavior section, select the Enable keyboard shortcuts checkbox.
  4. Select Save changes.

Troubleshooting

Linux shortcuts

Linux users may encounter GitLab keyboard shortcuts that are overridden by their operating system, or their browser.