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, selectHelpand thenKeyboard shortcuts.

Althoughglobal shortcutswork 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 yourProjectspage.
Shift+g Go to yourGroupspage.
Shift+a Go to yourActivitypage.
Shift+l Go to yourMilestonespage.
Shift+s Go to yourSnippetspage.
s// Put cursor in the search bar.
Shift+i Go to yourIssuespage.
Shift+m Go to yourMerge requestspage.
Shift+r Go to yourReview requestspage.
Shift+t Go to yourTo-Do Listpage.
p,thenb Show or hide the Performance Bar.
Escape Hide tooltips or popovers.
g,thenx Toggle betweenGitLabandGitLab Next(GitLab SaaS only).
. Open theWeb 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 hasWriteandPreviewtabs 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.Introducedin GitLab 15.3.
Command+[ Control+[ Outdent text.Introducedin 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 theProject overviewpage.
g+v Go to the projectActivitypage (Manage > Activity).
g+r Go to the projectReleasespage (Deploy > Releases).
g+f Go to theproject files(Code > Repository).
t Open the project file search dialog. (Code > Repository,selectFind Files).
g+c Go to the projectCommitspage (Code > Commits).
g+n Go to theRepository graphpage (Code > Repository graph).
g+d Go to the charts in theRepository analyticspage (Analyze > Repository analytics).
g+i Go to the projectIssuespage (Plan > Issues).
i Go to theNew Issuepage (Plan > Issues,selectNew issue).
g+b Go to the projectIssue boardspage (Plan > Issue boards).
g+m Go to the projectMerge requestspage (Code > Merge requests).
g+p Go to the CI/CDPipelinespage (Build > Pipelines).
g+j Go to the CI/CDJobspage (Build > Jobs).
g+e Go to the projectEnvironmentspage (Operate > Environments).
g+k Go to the projectKubernetes clustersintegration page (Operate > Kubernetes clusters). You must have at leastmaintainerpermissionsto access this page.
g+s Go to the projectSnippetspage (Code > Snippets).
g+w Go to theproject wiki(Plan > Wiki), if enabled.
. Open theWeb 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 viewingmerge requests:

macOS shortcut Windows shortcut Description
]orj Move to next file.
[ork 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 areview.
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 selectFind File).
Move selection down (only while searching for files,Code > Repository,then selectFind File).
Enter Open selection (only while searching for files,Code > Repository,then selectFind File).
Escape Go back to theFind Filescreen (only while searching for files,Code > Repository,then selectFind File).
y Go to file permalink (only while viewing a file).
. Open theWeb IDE.

Repository graph

These shortcuts are available when viewing the projectrepository graph page (go toCode > Repository graph):

Keyboard shortcut Description
orh Scroll left.
orl Scroll right.
ork Scroll up.
orj Scroll down.
Shift+orShift+k Scroll to top.
Shift+orShift+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 awiki 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 viewingepics:

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

Disable keyboard shortcuts

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

To disable keyboard shortcuts:

  1. On the left sidebar, select your avatar.
  2. SelectPreferences.
  3. In theBehaviorsection, clear theEnable keyboard shortcutscheckbox.
  4. SelectSave changes.

Enable keyboard shortcuts

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

To enable keyboard shortcuts:

  1. On the left sidebar, select your avatar.
  2. SelectPreferences.
  3. In theBehaviorsection, select theEnable keyboard shortcutscheckbox.
  4. SelectSave changes.

Troubleshooting

Linux shortcuts

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