Generate Azure DevOps file preview URLs with one click — copy to clipboard and share in Teams.
Features
Right-click a file or use the editor title bar icon in VS Code to automatically:
Commit & push the file's changes to the remote branch
Generate an Azure DevOps file preview URL
Copy the link to clipboard, ready to paste into a Teams conversation
Usage
Explorer context menu → Share File
Editor context menu → Share File
Editor tab context menu → Share File
Editor title bar icon → Share File
Branch Behavior
Feature branches (feature / bugfix / ...)
Scenario
Behavior
File has uncommitted changes
Auto add → commit → pull --rebase → push, then copy link
Other staged files exist
Prompt for confirmation before committing together
Unpushed commits exist
Prompt for confirmation, pull --rebase → push, then copy link
Branch not on remote (or remote branch deleted)
Auto push -u to create remote branch, then copy link
No changes, already synced
Copy link directly
Remote branch deleted after PR merge
When a feature branch has been merged via Pull Request and the remote branch is deleted, but the local branch still exists:
The extension detects a local tracking reference (refs/remotes/origin/<branch>) even though the remote branch no longer exists.
On first share, it performs a push -u to re-create the remote branch, ensuring the generated URL is valid.
This verification result is cached for 30 minutes to avoid redundant pushes on subsequent shares of the same branch.
After 30 minutes, the next share will re-verify and push again if needed.
main / master branch
On main or master, the extension skips all git operations (no commit, no push). It builds the URL from the current branch and file path and copies it to clipboard directly.
The notification reads: URL copied (main, skip push): filename
This prevents accidental commits or pushes to the main branch. Use feature branches for the full commit-and-push workflow.