Gitlab HotKeys

2024 年 12 月 23 日

GitLab is a robust web-based platform that provides version control and collaborative features for managing software development projects. Its wide array of functionalities, such as issue tracking, CI/CD pipelines, and source code management, make it a favorite among developers worldwide. GitLab not only helps with organizing projects but also enhances productivity through its various shortcut keys. In this article, we’ll cover all the essential shortcut keys in GitLab, grouped according to their function. By mastering these shortcuts, users can streamline their workflow and navigate the platform more efficiently, whether you're a novice or an experienced GitLab user.

GitLab Windows Shortcut Keys

Global

Shortcut Action
? 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 the cursor in the issues or merge requests search
Shift I Go to your issues page
Shift T Go to your merge requests page
P B Show or hide the performance bar
Up Edit your last comment, you must be in a blank text field below a thread
Ctrl Shift P Toggle markdown preview when editing text in a text field

Project

Shortcut Action
G P Go to the project home page
G V Go to the project activity feed
G R Go to the project releases list
G F Go to the project files list
T Go to the project file search page
G C Go to the project commits list
G N Go to the repository graph page
G D Go to the repository charts
G I Go to the project issues list
I Go to the new issue page
G B Go to the project issues boards list
G M Go to the project merge requests list
G J Go to the CI/CD jobs list
G L Go to the project metrics
G E Go to the project environments
G K Go to the project Kubernetes cluster integration page
G S Go to the project snippets list
G W Go to the project wiki, if enabled

Issues and Merge Requests

Shortcut Action
E Edit description
A Change assignee
M Change milestone
L Change label
R Start writing a comment, if any text is selected it will be quoted
N Move to next unresolved discussion, merge requests only
P Move to previous unresolved discussion, merge requests only
] Move to next file, merge requests only
[ Move to previous file, merge requests only

Project Files

Shortcut Action
Up Move selection up
Down Move selection down
Enter Open selection
Esc Go back to file list screen, only while searching for files
Y Go to file permalink, only while viewing a file

Web IDE

Shortcut Action
Ctrl P Search for, and then open, another file for editing
Ctrl Enter Commit, when editing the commit message

Repository Graph

Shortcut Action
Left Scroll left
Right Scroll right
Up Scroll up
Down Scroll down
Shift Up Scroll to top
Shift Down Scroll to bottom

Wiki Pages

Shortcut Action
E Edit wiki page

Filtered Search

Shortcut Action
Ctrl Backspace Clear entire search filter
Alt Backspace Clear one token at a time

Epics

Shortcut Action
R Start writing a comment, if any text is selected it will be quoted
E Edit description
L Change a label

GitLab MacOS Shortcut Keys

Navigation

Shortcut Key Function Description
Cmd + Shift + P Open the command palette, allowing you to quickly search for and access any GitLab feature.
Cmd + Alt + H Navigate directly to the Home page, where you can find your projects, repositories, and personal dashboard.
Cmd + Alt + M Go directly to the Merge Requests section to manage and review your pull requests.
Cmd + Alt + I Quickly access the Issues section to view or create new issues related to your projects.
Cmd + Alt + R Navigate to the Repositories section, where all your repositories and their details are stored.

Code Editing

Shortcut Key Function Description
Cmd + Option + F Open the search dialog to quickly find a specific piece of code within the file you’re working on.
Cmd + Option + S Save the current file you're working on without having to manually navigate to the save button.
Cmd + Option + D Toggle the file description view, which provides additional details or metadata related to the file.
Cmd + Option + B Enable the file blame view, which shows who last modified each line of code in the file.

Git Operations

Shortcut Key Function Description
Cmd + Shift + C Open the commit dialog to commit your changes with a message, and then push them to your repository.
Cmd + Shift + T Toggle the terminal view to access Git commands directly from the terminal within GitLab.
Cmd + Shift + L Push your local changes to the remote GitLab repository.

Notifications and Alerts

Shortcut Key Function Description
Cmd + Shift + N Open the notifications panel to view new updates, comments, or issues that require your attention.
Cmd + Shift + A Open the activity stream to see the most recent activity and changes across your projects.

About GitLab

GitLab is an open-source web-based DevOps lifecycle tool that covers the entire software development process, from planning and development to CI/CD and monitoring. GitLab offers version control via Git, a robust issue tracking system, automated CI/CD pipelines, and project management capabilities. It allows developers to collaborate on projects more efficiently, with integrated version control and real-time discussions.

GitLab’s scalability makes it ideal for individual developers, teams, and large enterprises. It can be hosted on GitLab's cloud or self-hosted on your infrastructure, providing flexibility depending on your organization's needs. Additionally, GitLab includes features such as built-in container registry, security scanning, and monitoring, enabling teams to ship secure software faster.

GitLab Official Information

To make the most of GitLab, it’s important to be familiar with the official website and available resources for downloading and learning more about the platform.

  • Official Website: Visit GitLab.com for an overview of all features, products, and services offered by GitLab.
  • Download GitLab: You can download the GitLab Community Edition, Enterprise Edition, or install GitLab on your own infrastructure from Download GitLab.
  • GitLab Shortcut Keys Documentation: To learn more about GitLab shortcuts and commands, visit the official GitLab Shortcut Keys Documentation.

These resources will help you stay up to date with the latest features, updates, and community contributions related to GitLab.

GitLab Shortcut Keys FAQs

  1. How do I open the command palette in GitLab?
    Press Cmd + Shift + P on MacOS to quickly search for and access any feature or action in GitLab. This command is invaluable for those who need to move between pages or tools swiftly.

  2. What shortcut opens the merge requests page?
    To view or manage merge requests, simply press Cmd + Alt + M. This takes you directly to the merge request section, where you can track code changes and reviews.

  3. How do I save a file while editing code?
    If you’ve made changes to your code, use Cmd + Option + S to save the file quickly, without needing to navigate through menus or buttons.

  4. How do I open the notifications panel?
    Stay up to date with your team’s activities and alerts by pressing Cmd + Shift + N to open the notifications panel.

  5. What is the shortcut for committing changes?
    When you're ready to commit changes, use Cmd + Shift + C to open the commit dialog. This shortcut makes it easy to commit your changes with a message and push them to the remote repository.

  6. How can I toggle the terminal view?
    For accessing terminal commands directly in GitLab, press Cmd + Shift + T to toggle the terminal view. This is useful for users who want to execute Git commands or other scripts without leaving the interface.

  7. How do I go to the issues section in GitLab?
    To quickly navigate to the issues section where you can create, track, or manage issues, use Cmd + Alt + I. This shortcut will help you stay on top of project tasks.

  8. How do I find a specific piece of code in GitLab?
    Use Cmd + Option + F to search for specific code within your file, allowing you to find text or code snippets in seconds, speeding up your editing process.

Conclusion

By mastering GitLab’s shortcut keys, you can dramatically boost your productivity and efficiency. Whether you're navigating through your repository, editing code, or managing merge requests, using keyboard shortcuts eliminates the need for repetitive mouse clicks, allowing you to focus on the development process itself.

4.7/5 - (3 votes)