Question
· Oct 31, 2023

git-source-control with IRIS

I am trying to use git-source-control with IRIS. 

Things are moving along well. I have installed git, ipm/ zpm, git-source-control. I have done the initial configuration and initialized the repository. I am hoping there is some documentation available to describe how to use this within Studio. I see a new option on my toolbar labeled "Git". It gives me options Status, Settings, Launch Git UI, Push to remote branch, Fetch from remote, Pull changes from remote branch, Create a new branch, Check out an existing branch, Export All, Export All (Force), Import All, and Import All (Force). What do each of these options do? How to I initialize/ load the baseline copy of my application into the repository? What is a normal flow of fetching/ merging/ pulling source code, developing, and pushing back to the repository. I feel I am almost there, I just need to get over the goal line.

Discussion (8)7
Log in or sign up to continue

Thank you  to all who have responded so far. I still haven't explored all the references and links but find I am missing some answers I am looking for. First, I already have a developed (large) application where we have been manually performing source control. We want to move it into a repository in Git. Most of the information is about putting single new program into Git. How do I load the entire existing library? Second, is there something explains each of the Git options: Status, Settings, Launch Git UI, Push to remote branch, Fetch from remote, Pull changes from remote branch, Create a new branch, Check out an existing branch, Export All, Export All (Force), Import All, Import All (Force).

If the existing (large) application consists of a lot of ObjectScript artifacts (routines, globals, and maybe some classes) did you consider using Deltanji, an ObjectScript-native source code management solution? No Git involved, so none of the export/import that approach requires.

As well as versioning the code it handles the whole workflow, making it easy to promote changes from dev namespaces via test ones to production / packaging ones.

Hello Alan, we are lacking in documentation that explains what each of those menu items do. I logged a GitHub issue here to add that: https://github.com/intersystems/git-source-control/issues/296

You mention having an existing application with a lot of code already in source control that you would like to migrate to Git. What I might do for this situation is initialize a new Git repository and copy all the files from your older source control system into the repo. You can then configure git-source-control to use this new repository for source control. The "Import All" option will import the files from this new repository into IRIS.

In the meantime, here's a quick and dirty explanation of the options you mention:

  • Status: outputs the results of "git status" to the source control output
  • Settings: opens a web page where you can configure git-source-control settings
  • Launch Git UI: opens a web page where you can perform basic Git commands graphically
  • Push to remote branch: equivalent of "git push"
  • Fetch from remote: equivalent of "git fetch"
  • Pull changes from remote branch: equivalent of "git pull", plus a call to the pull event handler
  • Export All: exports all newly changed items in IRIS to the Git repository
  • Export All (Force): exports all items in IRIS to the Git repository, including those with older timestamps
  • Import All: imports all items in the Git repository to IRIS if the version in IRIS is outdated
  • Import All (Force): imports all items in the Git repository to IRIS

I find it easier, no offense to Tim (awesome guy and big help to me!) and his crew who did a great job on this tool, to just use the Git command line or TortoiseGit or one of the other third-party GUI tools for doing the Git workflow parts. Especially since I like to use Visual Studio Code for my coding in IRIS and the Git tools in IRIS Studio don't carry over to Visual Studio Code (yet). Just one more option if you are so inclined.

No offense taken - if you're working on a local dev environment/container/etc. it's absolutely a better experience to use a third party GUI rather than Git WebUI from git-source-control to manage things; the purpose of the source control extension in that case is just to do export of things in IRIS to the local filesystem. I generally just use GitHub Desktop. The Git WebUI is significantly more valuable in a remote / shared development environment where the alternative would be SSH'ing in and running git commands. This is still a valid option if you prefer and for the rare edge cases where something gets stuck.

One clarification, though - the Git tools in IRIS Studio *do* carry over to VSCode if you're using isfs for server-side editing.