GitLab Cheatsheet - Code Hosting Platform Shortcut Reference
GitLab’s keystrokes differ from GitHub’s in details, and the review flow is where they save the most time. This reference covers global navigation, repo/file search, Issue/MR shortcuts, and Merge-Request review and commenting. Use it when your team standardizes on GitLab CE/EE and you want keyboard-first reviewing and MR triage. After reading you navigate projects, files and MR threads as fast as you click, but with less mousing around.
Typical Use Case
For engineers who spend their day reviewing code and merging requests on GitLab. The web interface is genuinely keyboard-first, and learning it brings issue, merge request and review work close to terminal speed. The sheet is organised by area: global navigation through G-prefixed combinations for dashboard, activity, milestones, issues, merge requests, projects and snippets, plus search with S or the slash key; repository browsing with the file finder, converting the current URL to a permanent commit link, and the branch tag selector; code browsing with digits 1 through 9 and the find and find-next family; merge requests and review, covering comment submission, the close-and-comment variant, and single-line, multi-line and todo comments; and the full Markdown editing set. Press question mark at any time.
Repository Browsing 8
TYWBIPCUCode Browsing 7
1-9Cmd + /Cmd + FCmd + GCmd + Shift + GCmd + Shift + FCmd + Shift + PIssues & MRs 11
CCmd + EnterCmd + Option + EnterCmd + Shift + PCmd + BCmd + ICmd + KCmd + Option + ICmd + Shift + 7Cmd + Shift + 8Cmd + Shift + 9Code Review 6
Cmd + EnterCmd + Option + EnterCmd + Shift + EnterCmd + Shift + 7Cmd + Shift + 8Cmd + Shift + 9Markdown Editing 10
Cmd + BCmd + ICmd + KCmd + Option + ICmd + Shift + 7Cmd + Shift + 8Cmd + Shift + 9Cmd + Shift + .Cmd + Shift + CCmd + Shift + HParameter matrix
| Parameter | Effect | Example |
|---|---|---|
G then D | Jump to the dashboard | G then D |
G then A | Jump to the activity page | G then A |
G then M | Jump to milestones | G then M |
G then I | Jump to the Issues page | G then I |
G then L | Jump to the merge requests page | G then L |
G then P / G then S | Jump to projects / snippets | G then P |
S or / | Search | Press S |
? | Show keyboard shortcut help | Press ? |
T | Open the file finder with fuzzy file name matching | Press T |
Y | Convert the current URL to a fixed version (commit) for sharing | Press Y |
W | Switch to the branch/tag selector | Press W |
B / I / P / C / U | Issue template / Issue list / MR list / New file / Go up one directory | Press I |
1-9 | Jump to a given line number in the file | Press 5 |
Cmd + / | Toggle line comment | Cmd + / |
Cmd + F / Cmd + G | Search in file / jump to the next match | Cmd + G |
Cmd + Shift + G | Jump to the previous match | Cmd + Shift + G |
Cmd + Shift + F | Global search | Cmd + Shift + F |
Cmd + Shift + P | Open the command palette (and toggle preview/edit in the editor) | Cmd + Shift + P |
C | Create a new Issue / MR | Press C |
Cmd + Enter | Submit comment / submit review | Cmd + Enter |
Cmd + Option + Enter | Close and comment / approve MR | Cmd + Option + Enter |
Cmd + Shift + Enter | Request changes | Cmd + Shift + Enter |
Cmd + Shift + 7 / 8 / 9 | Add a single-line / multi-line / todo comment (also ordered/unordered/task lists in the editor) | Cmd + Shift + 7 |
Cmd + B / Cmd + I / Cmd + K | Bold / italic / insert link | Cmd + K |
Cmd + Option + I | Insert image | Cmd + Option + I |
Cmd + Shift + C / H / . | Code block / heading / quote | Cmd + Shift + C |
Common pitfalls
SymptomNothing happens after pressing G, and no page is opened
CauseThe key combo has a time window; G and the second letter must be pressed in quick succession, and a long gap voids it.
FixPress G then the target letter quickly in sequence; if unsure which page it maps to, press ? to open the help page and compare.
SymptomYou want to show a colleague a piece of code, but they see the latest code rather than your version
CauseYou copied the repository root URL, which points to a moving branch reference.
FixOn the code page press Y to convert the URL to a fixed version (commit hash) before sharing.
SymptomYou typed a long comment, hit a key by accident and the formatting is a mess, with no direct way to fix it after submitting
CauseThe edit and preview modes share the same set of shortcuts, and list/quote shortcuts are used more often than you would expect.
FixUse Cmd + Shift + P to toggle between preview/edit and check the layout; there is still a chance to revise after submitting, so submit the comment early with Cmd + Enter.
SymptomYou want to leave a line-level comment on an MR but created a file-level comment instead
CauseThe three forms of review comments are distinguished by different shortcuts: single-line, multi-line, and todo.
FixUse Cmd + Shift + 7 for a single-line comment, Cmd + Shift + 8 for multi-line, and Cmd + Shift + 9 for a todo comment.
SymptomScrolling a large file with the arrow keys to find specific code is very inefficient
CauseYou are not using line-number jumps or search navigation.
FixUse 1-9 to jump to the matching line number, Cmd + F to search file contents, and Cmd + G / Cmd + Shift + G to move between matches.
SymptomAfter pressing Cmd + Enter, neither a comment was posted nor a review conclusion reached
CauseCmd + Enter means different things in different contexts: in the editor it submits a comment, in the review panel it submits a review conclusion.
FixCheck whether focus is in the comment box or the review panel — the comment box submits a comment, the review panel submits a conclusion, and approving uses Cmd + Option + Enter.
Troubleshooting
1Look up the full shortcut help for the current page
Press the ? keyThe help content varies by area (repository browsing, MR, editor all differ) and is the most authoritative reference.
2Open the file finder to locate a file quickly
Press T then type some letters of the file nameSupports fuzzy matching, far faster than clicking down the directory tree.
3Open the command palette to run an action
Press Cmd + Shift + P then type the action nameWhen you cannot remember a shortcut, look here; the palette is also how you confirm whether an action is currently available.
4Pin the current URL to an immutable version
Press Y then copy the address barThe resulting link carries a commit hash, so the recipient sees exactly the code you shared.
5Locate and cycle through matches within a file
Press Cmd + F and type a keyword, then Cmd + G to go forward and Cmd + Shift + G to go backWhen the same keyword keeps hitting, use the latter two keys to go back and forth between matches, faster than reopening the search box.
Command Examples
Markdown shortcuts in the comment box instead of typing symbols
Cmd + B // bold
Cmd + I // italic
Cmd + K // insert link
Cmd + Shift + 7 // ordered list
Cmd + Shift + 8 // unordered list
Cmd + Shift + 9 // task listThe GitLab comment box renders Markdown, so shortcuts beat switching back to an editor to paste symbols. Task-list items from Cmd + Shift + 9 are checkboxes that reviewers can tick — far more actionable than writing "please follow up" in prose.
The three ways to land a review
Cmd + Enter // submit review
Cmd + Option + Enter // approve MR
Cmd + Shift + Enter // request changesEach outcome affects the pipeline and merge rules differently: approval can immediately satisfy a merge condition, while requesting changes blocks the merge entirely. Confirm which one you mean before pressing — do not turn a plain comment into an approval by accident.
Adding single-line, multi-line, and TODO comments while reviewing
Cmd + Shift + 7 // add single-line comment
Cmd + Shift + 8 // add multi-line comment
Cmd + Shift + 9 // add todo commentThese three keys shift meaning with context: ordered/unordered/task list in the editor, comments in the diff view. Used during review they pin feedback to an exact line, and the comment follows the line as the diff changes — far more reliable than writing "line 42" in prose.
Permalinks: turn a movable branch URL into a permanent reference
Y // convert the current URL to a fixed versionA default branch or tag URL keeps changing as the branch moves. Paste one into an issue, an MR description, or an incident record and months later readers land on entirely different code. Convert it to a permalink before referencing it so the discussion stays anchored.
Jump to a specific line in a file without the mouse
T // open the file finder
1-9 // jump to the corresponding line number
Cmd + / // toggle line commentThe file finder fuzzy-matches by name and opens on Enter; once open, 1-9 jumps to a line and Cmd + / toggles a line comment. Together they replace scrolling and mouse hunting when reading a large file or leaving throwaway notes.
Common Pitfalls
- .gitlab-ci.yml must be indented with spaces: a tab makes the YAML parser fail with a syntax error, the whole pipeline does not run, and the message usually does not name the offending file.
- force push overwrites commits other people already pushed to the same branch, and those commits are recoverable only through the reflog. Fetch and verify first on a shared branch, or always go through an MR.
- On a protected branch only Maintainers and Owners can force push or delete; developer pushes are rejected, so do not plan on everyone being able to rescue a bad push.
- If CI fails after an MR was merged, revert — do not append a fix commit to the merged branch, which leaves a history that is hard to trace.
- Cmd + Enter and Cmd + Option + Enter sit side by side: hitting the latter while still typing a comment approves the MR outright, with your review notes half-written.
- Pinning caches and dependencies to mutable tags such as latest makes pipeline results irreproducible — you cannot tell a code change from dependency drift.
Tips
- The T key opens the file finder - much faster than clicking, with fuzzy filename matching.
- The Y key converts the URL to a permalink (commit hash) to share a specific version.
- Cmd+Enter submits a comment, Cmd+Option+Enter closes and comments - no button clicking.
- During code review, Cmd+Shift+7 quickly adds a single-line comment.
- The Markdown editor supports Cmd+B bold, Cmd+I italic, Cmd+K insert link.
- The ? key shows all keyboard shortcuts - check anytime.
FAQ
How does the G-then-X navigation work in the GitLab web UI?
It is a two-key sequence: press G, then a second letter. G then D lands on the dashboard, G then A on activity, G then M on milestones, G then I on Issues, G then L on merge requests, G then P on the project overview and G then S on snippets. Press ? on any page for the full shortcut sheet, which beats memorising. Global search is S or /.
What is the fastest way to jump around a repository in GitLab besides pressing T?
T opens the file finder with fuzzy filename matching, far quicker than clicking through directories. W toggles the branch/tag selector so you can confirm which version you are looking at, and Y converts the current URL to a permanent version pinned to a commit hash, so a link you share shows exactly what you saw. U goes back up a directory, and the number keys 1 through 9 jump straight to that line in a file. B opens the issue template, I and P list issues and merge requests, and C starts a new file.
Which Markdown shortcuts are available in the GitLab comment and issue editors?
For inline formatting use Cmd + B for bold, Cmd + I for italic, Cmd + K to insert a link and Cmd + Option + I for an image. Lists are Cmd + Shift + 7 ordered, Cmd + Shift + 8 unordered and Cmd + Shift + 9 task list. Block-level formatting adds Cmd + Shift + H heading, Cmd + Shift + C code block and Cmd + Shift + . quote. Submit with Cmd + Enter, or close and comment in one go with Cmd + Option + Enter, and Cmd + Shift + P toggles between edit and preview.
How do I give a verdict quickly when reviewing a merge request?
Submit the review with Cmd + Enter. Approve the MR outright with Cmd + Option + Enter, and request changes with Cmd + Shift + Enter. For inline feedback, Cmd + Shift + 7 adds a single-line comment, Cmd + Shift + 8 a multi-line comment and Cmd + Shift + 9 a todo comment. Pair that with Cmd + Shift + F for a repository-wide search when you need context, and Cmd + / to toggle line comments.
What is the difference between finding a file and searching file contents in GitLab?
T opens the file finder, which only fuzzy-matches file names and answers "which file is it?". Cmd + F searches inside the file you are viewing, while Cmd + Shift + F runs a repository-wide content search. Move between hits with Cmd + G for the next match and Cmd + Shift + G for the previous one, so you never have to reopen the search box. If you would rather not remember keys, Cmd + Shift + P opens the command palette where you can search for the action by name.
Official References
Each command links to its official documentation below, so you can verify the latest usage and read deeper.
Maintained by LaoHand
Publicly updated on Jul 21, 2026, continuously proofread against official docs.
Contact Us
Wrong command or description? Send us corrections, business inquiries or product feedback by email.
Contact Us