Skip to content
| Marketplace
Sign in
Visual Studio Code>Snippets>GitHub ShortcutsNew to Visual Studio Code? Get it now.
GitHub Shortcuts

GitHub Shortcuts

Pitu

|
6 installs
| (0) | Free
Open or copy GitHub URL files or repository
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

GitHub Shortcuts

Open GitHub Repository URL

Open at browser a GitHub URL of your current repository.

Open GitHub URL

Open at browser a GitHub URL of your current file. Works for both text files (with line numbers) and non-text files like images, PDFs, and other binary files (without line numbers).

Copy GitHub URL

Copy a GitHub URL of your current file location to the clipboard. Works for both text files and non-text files like images, PDFs, and other binary files (without line numbers).

Example (text file): https://github.com/differentmatt/vscode-copy-github-url/blob/example-branch/extension.js

Example (image file): https://github.com/differentmatt/vscode-copy-github-url/blob/example-branch/images/icon.png

Copy GitHub URL Permanent

Copy a GitHub Permanent URL of your current file location to the clipboard. Works for both text files (with line numbers) and non-text files like images (without line numbers).

The same context menu options are available in the Explorer panel for this command.

Example (text file): https://github.com/differentmatt/vscode-copy-github-url/blob/c49dae32/extension.js#L4

Example (image file): https://github.com/differentmatt/vscode-copy-github-url/blob/c49dae32/images/icon.png

Copy GitHub URL Default Branch

Copy a GitHub default branch URL of your current file location to the clipboard. Works for both text files (with line numbers) and non-text files like images (without line numbers).

Example (text file): https://github.com/differentmatt/vscode-copy-github-url/blob/main/extension.js#L4

Example (image file): https://github.com/differentmatt/vscode-copy-github-url/blob/main/images/icon.png

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft