Easily get the repository link to the current file, line or a selection
You must have git installed.
apm install git-link
Or search for the git-link
package via Settings > Packages
. Read more on Atom Packages.
- Works for GitHub.com (public, tested)
- Works for GitLab.com (public, tested)
- Works for BitBucket.org (public, tested)
- Works for Azure DevOps (public, tested)
- It might work for others (untested, PRs welcome)
Please add an issue if you need support for a platform not mentioned above.
- Share and open what you've worked on, or a bug you've spotted
- Copy a link to a line, selection or file for the current commit
- Additional features added for command-palette-plus
- Built with convenience in mind (#tips)
- Handles non-typical file and folders okay - e.g.
[myfolder]/my#file.txt
- References markdown files in plaintext (on supported platforms)
No keymaps are currently set by default.
I recommended you configure your own keybindings and use what is comfortable for you. You can do this by going to Settings > Keybindings
or open it from the Command Pallete using Application: Open Your Keymap
.
Command List | Description |
---|---|
git-link:copy-link-to-line |
Copy a link to the current line |
git-link:copy-link-to-selection |
Copy a link to the current selection |
git-link:copy-link-to-file |
Copy a link to the current file |
git-link:copy-link-to-repository |
Copy a link to the current repository |
git-link:open-line-in-browser |
Open the current line in browser |
git-link:open-selection-in-browser |
Open the current selection in browser |
git-link:open-file-in-browser |
Open the current file in browser |
git-link:open-repository-in-browser |
Open the current repository in browser |
git-link:edit-line-in-browser |
Edit current line in browser |
git-link:edit-selection-in-browser |
Edit current selection in browser |
git-link:edit-file-in-browser |
Edit current file in browser |
Personally, I got the most value out of this by:
- keybinding the
git-link:copy-link-to-selection
command, - leaning on the default behaviour of opening the link on double copy
- Which means I'm able to copy a link of the current line, a selection or choose to open it in the browser all with one keybind.
Permalinks are possible only if changes are available remotely (changes have been pushed).
Please take a look at our contributing guidelines if you're interested in helping out!
- Open a file locally based on a copied link.
- Add option to disable default behaviour for 'Opening links on double copy'.
- Custom tracker integration linking (e.g. copy / open link to relevant ticket this last change)
- Open blame view for file in browser
- Open history view for file in browser
- Open issues view for file in browser
- Open PR/MR view for file in browser
- Open/Copy compare view/link e.g. to current branch or a commit for file in browser
- Detect PR branch and have a link ready for that as well (quickly jump to current PR in atom/browser) e.g. when doing a review
- Open README in browser
If you like or found this project helpful, please leave a star and consider supporting it for further development.