Skip to content

Latest commit

 

History

History
204 lines (150 loc) · 9.58 KB

File metadata and controls

204 lines (150 loc) · 9.58 KB

💎 GitHub Secrets You Need to Know

🇺🇸 English | 🇧🇷 Português

GitHub License GitHub last commit GitHub Stars

A guide by @emellybmuniz with the best shortcuts and tricks to master your productivity on the platform.

⌨️ 1. Essential Shortcuts

  • . (Period) → Press . in any repository to open the VS Code editor (github.dev) instantly in your browser.
  • > (Greater than) → Opens github.dev in a new browser tab (keeping the current tab open).
  • Cmd/Ctrl + KCommand Palette. Navigate, search, and execute actions anywhere on GitHub:
    • # (Issues/PRs)
    • @ (Users)
    • / (Files in the repository)

🧭 2. Navigation

  • TFile Finder (Fuzzy Finder). Type the file name to find it quickly.
  • W → Quickly switch between Branches.
  • S or / → Focus the Search bar.
  • ? → Lists all keyboard shortcuts available for that specific view.
  • J → Move selection down (in lists of issues, PRs, notifications).
  • K → Move selection up (in lists).
  • XToggle selection (check/uncheck item).
  • O or EnterOpen selected item.
  • Esc → Close dialog or hovercard.

💻 3. Code Editing in github.dev

When you open the web editor (by pressing .), you have access to several editing shortcuts:

Basic Editing

  • Ctrl/Cmd + XCut entire line (copies and deletes).
  • Ctrl/Cmd + Shift + KDelete entire line (without copying to clipboard).
  • Ctrl/Cmd + CCopy line (without selection).
  • Ctrl/Cmd + VPaste.
  • Alt + /Move line up/down.
  • Alt + Shift + /Duplicate line up/down.
  • Ctrl/Cmd + /Toggle line comment.
  • Ctrl/Cmd + ZUndo.
  • Ctrl/Cmd + YRedo.

Markdown Formatting

  • Ctrl/Cmd + B → Insert Markdown formatting for bold.
  • Ctrl/Cmd + I → Insert Markdown formatting for italic.
  • Ctrl/Cmd + K → Insert Markdown formatting to create a link.
  • Ctrl/Cmd + Shift + 7 → Ordered list.
  • Ctrl/Cmd + Shift + 8 → Unordered list.
  • Ctrl/Cmd + Shift + . → Blockquote.

Search and Navigation

  • Ctrl/Cmd + FFind in file.
  • Ctrl/Cmd + G → Find next.
  • Ctrl/Cmd + Shift + G → Find previous.
  • Ctrl/Cmd + GGo to specific line.
  • Ctrl/Cmd + S → Save / Write commit message.
  • Ctrl/Cmd + Shift + P (or F1) → Open the Command Palette (access to all functions).

🧐 4. Code Review

  • L → Jump to a specific Line.
  • Y → Create a Permalink (permanent link to the exact code version).
  • IShow/Hide Comments in Diffs and PRs.
  • R → (With text selected) Quote the text in a new comment.
  • Shift + Click → Select a block of lines (e.g., #L18-L20).
  • B → Open Blame view (see who last changed each line).
  • A → Show/hide annotations in diffs.
  • EEdit file directly (opens edit tab).

⚡ 5. Agile Navigation (Go-to)

  • G + C → Go to Code.
  • G + I → Go to Issues.
  • G + P → Go to Pull Requests.
  • G + D → Go to Homepage (Dashboard).
  • G + N → Go to Notifications.
  • G + B → Go to Projects (repository).
  • G + A → Go to Actions.
  • G + W → Go to Wiki.
  • G + G → Go to Discussions.

🤖 6. GitHub Actions

  • Ctrl/Cmd + Space → Get suggestions in the workflow editor.
  • G + F → Go to the workflow file.
  • Shift + T or T → Toggle timestamps in logs.
  • Shift + F or F → Toggle full screen in logs.
  • Esc → Exit full screen logs.

🔔 7. Notifications

  • E → Mark as done.
  • Shift + U → Mark as unread.
  • Shift + I → Mark as read.
  • Shift + MUnsubscribe.

🔍 8. Code Search (Advanced Search)

GitHub has a powerful code search tool that lets you find exactly what you're looking for:

Search Qualifiers

  • repo:user/repository → Limit search to a specific repository.
  • org:organization → Search across all repositories in an organization.
  • language:language → Filter by language (e.g., language:python).
  • path:path → Search in a specific path (e.g., path:src/).
  • symbol:name → Search for a symbol/function definition.
  • extension:ext → Filter by file extension.

Boolean Operators

  • term1 AND term2 → Both terms must be present.
  • term1 OR term2 → At least one term must be present.
  • term1 NOT term2 → Exclude results with term2.

Regex Search

  • Use /your-regex/ for regular expression searches.
  • Example: /foo(bar|baz)/ finds "foobar" or "foobaz".

Tips

  • Use quotes to search for exact phrases: "specific function".
  • Combine qualifiers: repo:user/repo language:python path:src/.
  • Access https://cs.github.com for the new Code Search interface.

🔗 9. URL Tricks (Repositories)

  • github.comgithub.dev → Opens in the VS Code web editor.
  • github.comgithubbox.com → Opens the repository in a sandbox (CodeSandbox).
  • .../pull/123.../pull/123.diff → Shows the Pull Request as a plain text .diff file.
  • .../pull/123.../pull/123.patch → Views the PR as a .patch file.

👤 10. URL Tricks (Profiles and Feeds)

  • github.com/username.keys → Views the user's public SSH keys.
  • github.com/username.png → Direct link to the profile picture.
  • github.com/username.atom → RSS feed of the user's public activity.
  • Example: github.com/emellybmuniz.png

✨ 11. Collaboration and Extras

  • Easter Egg: Visit api.github.com/octocat to see the octocat mascot in ASCII art.
  • Blame View: Click "Blame" within a file to see who last changed each line (or use the B shortcut).
  • Draft PRs: Create Draft Pull Requests to collaborate without notifying the entire team.
  • Saved Replies: Configure saved replies in Settings to speed up your code reviews (shortcut: Ctrl/Cmd + . + [number]).
  • Command Palette: Use Ctrl/Cmd + K to quickly access actions without navigating menus.
  • File Tree: In the new Code View, use the side file tree to easily navigate the repository structure.
  • Jump to Definition: In over 10 languages, click on a symbol to automatically jump to its definition (no setup required).
  • Tab Navigation: Use Ctrl/Cmd + 1-9 to switch between open tabs in the editor.

🤖 12. GitHub Copilot (Bonus)

If you use GitHub Copilot in github.dev or VS Code:

  • TabAccept suggestion.
  • Alt/Option + ]Next suggestion.
  • Alt/Option + [Previous suggestion.
  • Ctrl/Cmd + Enter → Force suggestion generation / Open suggestions panel.
  • Ctrl/Cmd + I → Open inline chat.
  • EscDismiss suggestion.
  • Alt/Option + </kbd> → Trigger inline suggestion manually.

Slash Commands in Copilot Chat

  • /fix → Automatically fix errors.
  • /explain → Explain selected code.
  • /tests → Generate unit tests.
  • /docs → Add/improve documentation.
  • /optimize → Suggest performance improvements.

Liked this guide? Leave a star on the repository to check it out later!


📚 References

This guide was created based on:

✍️ Author

Developed by Emelly Beatriz with ❤️

📬 Get in touch:

📧 emellybmuniz@gmail.com | 💼 Linkedin | 🐙 Github

Last updated: November 2025