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
3. Install ZPM, following the directions here: https://openexchange.intersystems.com/package/ObjectScript-Package-Manager
18
-
4. Load this repository into IRIS using ZPM.
14
+
2. Load this repository into IRIS using ZPM.
19
15
```
20
16
zpm "load <absolute path to git-source-control> -verbose"
21
17
```
22
-
5. To port your Git settings to IRIS, set the following globals:
23
-
```
24
-
set ^|"%SYS"|SYS("SourceControl","Git","%defaultTemp")="c:\temp\"
25
-
set ^|"%SYS"|SYS("SourceControl","Git","%gitBinExists")=1
26
-
set ^|"%SYS"|SYS("SourceControl","Git","%gitBinPath")="C:\Program Files\Git\bin\git.exe"
18
+
3. Configure settings by running the following method and answering the prompts:
27
19
```
28
-
29
-
6. Run this to set the extension interface up in your editor.
20
+
d ##class(SourceControl.Git.API).Configure()
30
21
```
31
-
do ##class(%Studio.SourceControl.Interface).SourceControlClassSet("SourceControl.Git.Extension")
32
-
```
33
-
7. In the USER namespace in IRIS, set the following globals:
34
-
```
35
-
set ^SYS("SourceControl","Git","settings","groupByFolder")=""
36
-
set ^SYS("SourceControl","Git","settings","mappings","CLS","*")="cls/"
37
-
set ^SYS("SourceControl","Git","settings","mappings","CLS","UnitTest")="test/"
38
-
39
-
set ^SYS("SourceControl","Git","settings","namespaceTemp")="<absolute path to the git repo>"
40
-
set ^SYS("SourceControl","Git","settings","user",$Username,"gitUserEmail")="<git-username>@users.noreply.github.com"
41
-
set ^SYS("SourceControl","Git","settings","user",$Username,"gitUserName")="<Your Name>"
42
-
```
43
-
8. Set up `isfs` server-side editing in VS Code. First save your current workspace in which you have the code open. Then, open the `.code-workspace` file generated by VS Code and add the following to the list of folders:
22
+
4. If using VSCode: Set up `isfs` server-side editing. First, save your current workspace in which you have the code open. Then, open the `.code-workspace` file generated by VS Code and add the following to the list of folders:
44
23
```
45
24
{
46
25
"name": "<whatever you want the folder to show up as in the project explorer view>",
47
26
"uri": "isfs://<instance_name>:<namespace_name>/"
48
27
}
49
28
```
50
-
9. Go to the URL [http://localhost:<port_number>/isc/studio/usertemplates/gitsourcecontrol/webuidriver.csp/USER]([http://localhost:<port_number>/isc/studio/usertemplates/gitsourcecontrol/webuidriver.csp/USER) and verify that you can see the commit history of your current project.
51
-
10. Verify that the server side source control on your editor shows all the Git options by selecting a file on the server and clicking the Server-side Source Control button on the top right-hand corner. Launch the Git UI and verify it runs as expected.
52
29
53
-
<br/>
30
+
## Basic Use
31
+
32
+
### Studio
33
+
Add a file for tracking by right clicking on it in the workspace/project view and choosing Git > Add.
34
+
This same menu also has options to remove (stop tracking the file), discard changes (revert to the index), or commit changes.
35
+
36
+
You can browse file history and commit changes through a user interface launched from the top level Git > "Launch Git UI" menu item. There is also a page for configuring settings.
37
+
38
+
### VSCode
39
+
The same right click menus as in Studio live under "Server Source Control..." when right clicking in a file (in the editor) or on a file when exploring an isfs folder. The top level "source control" menu is accessible through the command palette or the source control icon in the top right of the editor.
40
+
41
+
### A Note on Security
42
+
If you want to interact with remotes from VSCode/Studio directly (e.g., to push/pull), you must use ssh (rather than https), create a public/private key pair to identify the instance (not yourself), configure the private key file for use in Settings, and configure the public key as a deploy key in the remote(s).
0 commit comments