You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/links.md
+92Lines changed: 92 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,6 +2,26 @@
2
2
3
3
This document covers the various VSCode link formats that work with GitLens, along with their formats, parameters and descriptions.
4
4
5
+
## Contents
6
+
7
+
### Repository Items
8
+
9
+
-[Repository](#repository'Jump to Repository')
10
+
-[Branch](#branch'Jump to Branch')
11
+
-[Commit](#commit'Jump to Commit')
12
+
-[Tag](#tag'Jump to Tag')
13
+
-[Comparison](#comparison'Jump to Comparison')
14
+
-[File/Lines](#filelines'Jump to File/Lines')
15
+
16
+
### GitKraken Cloud Items
17
+
18
+
-[Cloud Patch/Code Suggestion](#cloud-patchcode-suggestion'Jump to Cloud Patch/Code Suggestion')
19
+
-[Cloud Workspace](#cloud-workspace'Jump to Cloud Workspace')
20
+
21
+
### GitKraken Account Links
22
+
23
+
-[Login](#login'Jump to Login')
24
+
5
25
## Notation
6
26
7
27
The following are used in link notation in this document:
@@ -34,12 +54,24 @@ The following are used in link notation in this document:
34
54
35
55
### Repository
36
56
57
+
#### Description
58
+
59
+
Used to open a (remote) repository in GitLens. Once the repository is opened, the Commit Graph will open to that repository.
60
+
37
61
#### Format
38
62
39
63
_{prefix}/r/{repoId}?{baseQuery}_
40
64
65
+
#### Example Usage
66
+
67
+
Right click a remote in the Remotes view and choose "Share -> Copy Link to Repository", and share with a teammate. When they access the link, GitLens will help them clone the repository, open it in GitLens, add the remote you linked, and open the Commit Graph to the repository, step-by-step.
68
+
41
69
### Branch
42
70
71
+
#### Description
72
+
73
+
Used to open a (remote) branch in GitLens. Once the branch's repository is opened, GitLens will open the Commit Graph to that repository and select the branch, or perform another action if specified (see _{action}_ in _References_ below).
-_switch-to-pr-worktree_: Does everything that the _switch-to-pr_ action does, but always chooses to open the branch in a worktree, creating a new one if needed and creating a new local branch if needed. For creating the local branch and worktree, default options are chosen. The worktree is then opened in a new window.
60
92
93
+
#### Example Usage
94
+
95
+
Right click a branch in the Commit Graph and choose "Share -> Copy Link to Branch", select a remote to copy the branch for, and share with a teammate. When they access the link, GitLens will help them clone the repository, open it in GitLens, add the remote you linked, and open the Commit Graph to the branch, step-by-step.
96
+
61
97
### Commit
62
98
99
+
#### Description
100
+
101
+
Used to open a (remote) commit in GitLens. Once the commit's repository is opened, GitLens will open the Commit Graph to that repository and select the commit.
Right click a commit in the Commit Graph and choose "Share -> Copy Link to Commit", select a remote to copy the commit for, and share with a teammate. When they access the link, GitLens will help them clone the repository, open it in GitLens, add the remote you linked, and open the Commit Graph to the commit, step-by-step.
114
+
71
115
### Tag
72
116
117
+
#### Description
118
+
119
+
Used to open a (remote) tag in GitLens. Once the tag's repository is opened, GitLens will open the Commit Graph to that repository and select the tag.
-_{tagName}_ is the name of the tag. Note that the remote name should not be included. Instead, _{remoteUrl}_ is used to determine the remote for the tag. So if the tag _15.2.0_ is located on _origin_, for example, _{tagName}_ should just be _15.2.0_ and the remote url of _origin_ should be used for the _{remoteUrl}_ parameter. You should not set _{tagName}_ to _origin/15.2.0_ in this example.
80
128
129
+
#### Example Usage
130
+
131
+
Right click a tag in the Tags View and choose "Share -> Copy Link to Tag", select a remote to copy the tag for, and share with a teammate. When they access the link, GitLens will help them clone the repository, open it in GitLens, add the remote you linked, and open the Commit Graph to the tag, step-by-step.
132
+
81
133
### Comparison
82
134
135
+
#### Description
136
+
137
+
Used to open a comparison between two references in the _Search & Compare_ view.
-_{prRepoUrl}_ is an optional parameter, generally used for Pull Request comparisons, representing the pull URL of the git remote that represents the head commit of the Pull Request. It is formatted similar to _{remoteUrl}_, so see Common References section above to learn how to format it.
92
148
149
+
#### Example Usage
150
+
151
+
Share the changes of a pull request by right clicking the pull request's branch in the Commit Graph and choose "Compare with Common Base". The changes should be opened in the _Search & Compare_ view. Right click the Comparison item in the _Search & Compare_ view and choose "Share -> Copy Link to Comparison", and choose a remote to copy the comparison for. Share the link with a teammate. When they access the link, GitLens will help them clone the repository, open it in GitLens, add the remote, and open the _Search & Compare_ view to the pull request's changes, step-by-step.
152
+
93
153
### File/Lines
94
154
155
+
#### Description
156
+
157
+
Used to open a repository to a file, or specific lines of code within a file. Can open a file at a particular reference point or target the working copy of the file. Will highlight the specified lines of code if included.
-_{ref}_ is an optional parameter representing the ref at which the file is referenced. Can be a branch name or tag name, fully qualified ref like _refs/tags/…_ or a commit SHA/revision. If this is not supplied, the link points to the working version of the file.
106
170
171
+
#### Example Usage
172
+
173
+
To guide a teammate to a specific line of code, right click the line in the editor and choose "Share -> Copy Link to Code". Then choose which remote to target. If you prefer to target a block of code or multiple lines, highlight the lines and then right click the highlighted code and choose "Copy As -> Copy Link to Code". Then share the link with a teammate. When they access the link, GitLens will help them clone the repository, open it in GitLens, add the remote, and open the file to the specified lines of code, step-by-step.
-_{prEntityId}_ refers to the GK entity identifier for the Pull Request related to the code suggestion.
132
204
205
+
#### Example Usage
206
+
207
+
When you create a cloud patch from the _Cloud Patches_ view, you will receive a notification that the cloud patch has been successfully created. On that notification is a "Copy Link" button. Click it to copy a link to the cloud patch to your clipboard. Share the link with a teammate (ensure that the teammate has access based on the permissions/visibility you set for the cloud patch). When they access the link, GitLens will help them open the cloud patch in GitLens and view the patch changes, and even apply the changes to their local repository.
-_{workspaceId}_ is the ID of the cloud workspace.
142
222
223
+
#### Example Usage
224
+
225
+
Right click a cloud workspace in the _GK Workspaces_ view and choose "Share -> Copy Link to Workspace". Use this link to open the view to the chosen workspace in GitLens.
226
+
143
227
## GitKraken Account Links
144
228
145
229
### Login
146
230
231
+
#### Description
232
+
233
+
Used to log in to a GitKraken account from GitLens.
0 commit comments