Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>Copy Git Provider URLNew to Visual Studio Code? Get it now.
Copy Git Provider URL

Copy Git Provider URL

tbremer

|
6 installs
| (0) | Free
Copy git provider URLs for the current file at current hash, branch, or trunk
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Copy Git Provider URL

A VS Code extension that allows you to easily copy git provider URLs for the current file with different reference types.

Features

  • Copy Git URL at Current Hash: Copy a URL pointing to the current file at the current commit hash
  • Copy Git URL at Current Branch: Copy a URL pointing to the current file at the current branch
  • Copy Git URL at Trunk: Copy a URL pointing to the current file at the origin trunk (main/master)

The extension automatically detects the git provider and formats the URL accordingly. Supported providers:

  • GitHub
  • GitLab
  • Bitbucket

URLs include the current line number based on your cursor position.

Usage

  1. Open a file in a git repository
  2. Open the Command Palette (Cmd+Shift+P on macOS, Ctrl+Shift+P on Windows/Linux)
  3. Type and select one of:
    • Copy Git URL at Current Hash
    • Copy Git URL at Current Branch
    • Copy Git URL at Trunk
  4. The URL is copied to your clipboard and displayed in a notification

Requirements

  • The file must be in a git repository
  • The repository must have a remote named origin

Extension Settings

This extension does not require any settings.

Known Issues

None at this time.

Release Notes

0.0.1

Initial release with support for copying git URLs at hash, branch, or trunk.

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