Question
· Jul 15

How to enable multiple branches for different users in Git for Shared Development Environments on IRIS?

We have installed IRIS on a separate server that we access remotely and copied all code and data to it so we can test IRIS before we do the move. We develop directly on the server. We Use VsCode to code but sometimes we might need to go to cache studio for some tasks.

We were interested in git for Shared Development Environments, we have installed it on a server with IRIS 2021 and configured it by following the instructions and videos of InterSystems summits we found online. We initialised a local repository on the server, added some files to start testing branches.

While testing the Git for Shared Development Environments we noticed that the settings for namespace are the same for all users and settings for user are different for each user, but setting for a user are only the username and email. We also noted the when a user checks out a branch it is not checked out for himself only but also for the other users accessing the server. Any changes done from any user are all on the same branch. We cannot find a way for different users to work on multiple branches simultaneously. 

Could you kindly give us an indication of what we are missing?

Product version: IRIS 2021.1
$ZV: IRIS for Windows (x86-64) 2021.1.3 (Build 389) Wed Feb 15 2023 15:07:32 EST
Discussion (4)5
Log in or sign up to continue

Hello Reuben,

You're correct that a single namespace can only have a single branch checked out at a time with git-source-control. The reason is that the namespace has one Git repository, and a Git repository cannot have multiple branches checked out at the same time.

I would consider this a feature rather than a bug. Imagine that a single namespace was associated with multiple branches, and an item has different changes on each branch. Which branch's version of the item would get loaded into IRIS? Shared development environments require there to be a single source of truth for the state of every item in source control.

For your scenario I might suggest single-user development environments. You could create a separate namespace for each developer on your server. Each namespace would have its own repository, with its own branches, cloning the same remote repository. The downside is that if two users edit the same item in different namespaces, you can end up with merge conflicts that you will need to resolve. I would highly recommend single-user environments if your developers are already comfortable with Git.

It is often the case with large applications that developers would like to or need to work on unrelated parts of an application simultaneously. It is a limitation of the Git for Shared Development Environments application from the InterSystems Open Exchange that you cannot do this in a single namespace. That's because it is built on git, where you can only have a single branch checked out to a working folder at any one time.

Our InterSystems-native source control and integrated deployment solution Deltanji allows developers to create multiple separate branches within the same namespace.  Because Deltanji has finer granularity it can handle concurrent non-overlapping sets of changes in a single namespace, enabling users to check code entities out onto separate Change Requests, then promote these independently.

Even with a team as small as one person it is common for Deltanji-controlled development to take place this way. Use of QA and/or Staging environments ensures that unforeseen dependencies created in the Development environment between supposedly independent Change Requests will be detected before they can impact the Production environment.