https://github.com/pkief/vscode-copy-branch-name
VS Code extension to copy the current branch name into the clipboard
https://github.com/pkief/vscode-copy-branch-name
branch clipboard git name vscode-extension
Last synced: 7 months ago
JSON representation
VS Code extension to copy the current branch name into the clipboard
- Host: GitHub
- URL: https://github.com/pkief/vscode-copy-branch-name
- Owner: PKief
- License: mit
- Created: 2022-08-01T20:07:39.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2024-08-02T16:29:26.000Z (almost 2 years ago)
- Last Synced: 2024-08-03T16:16:57.280Z (almost 2 years ago)
- Topics: branch, clipboard, git, name, vscode-extension
- Language: TypeScript
- Homepage: https://marketplace.visualstudio.com/items?itemName=PKief.copy-branch-name
- Size: 631 KB
- Stars: 3
- Watchers: 2
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Funding: .github/FUNDING.yml
- License: LICENSE.md
Awesome Lists containing this project
README
VS Code - Copy Branch Name
Copy the current Git branch name to your clipboard.
## How it works
### Status Bar
After installing this extension you will find a new icon in the status bar. As soon as you click on it, the current branch name will be copied to your clipboard so that you can paste it somewhere else in your workflow.

### Command palette
In addition, it's also possible to run the copy command via VS Code command palette. The command is called `Copy current branch name`.

If the name of the branch was successfully copied to the clipboard, a message text appears in the status bar for a few seconds.
## Multiple Repositories Support
This extension also supports multiple repositories with intelligent branch detection:
- **When a file is open**: The extension automatically copies the branch name from the repository containing the currently active file, ensuring you always get the correct branch name.
- **When no file is active**: If multiple repositories are available in your workspace, the extension will show a quick selection dialog allowing you to choose which repository's branch name to copy. The dialog displays each repository with its workspace name and current branch (e.g., "ProjectName (main)") for easy identification.
- **Single repository**: When only one repository is available, the extension automatically uses it without any prompts.