Written by

Question Gautam Rishi · Jun 7, 2023

how can i use git for versioning while working in IRIS

how can i use git for versioning while working in IRIS. 
I am having directory that i created while working in iris. How can i manage version control using git in this case.

Is it possible with vscode terminal or with a normal terminal in mac.

Product version: IRIS 2023.1

Comments

Gautam Rishi  Jun 8, 2023 to Timothy Leavitt

I am still not clear with these video links. What I want it I have a git repo which I cloned and imported in IRIS system. Now we have one repo which is from git and other is inside iris system. Now if i make changes in IRIS system repo shall they be reflected in my original repo or how can i commit those changes.

0
Evgeny Shvarov  Jun 8, 2023 to Gautam Rishi

Well, if you have git repo cloned with objectscript files and VSCode connected to IRIS all your files are imported into IRIS and can be executed there.

You change the objectscript files in VSCode, compile and they are imported into IRIS automatically.

VSCode and git maintain the versioning of changes for you.  

0
Gautam Rishi  Jun 9, 2023 to Evgeny Shvarov

what about if I am switching branches in my git repo how is that managed in the IRIS instance?

0
Evgeny Shvarov  Jun 9, 2023 to Gautam Rishi

Nothing happens until you intentionally load classes from a new branch and other resources into an IRIS namespace.

But I highly recommend you to rebuild iris docker image and reload classes from a new branch when switching branches otherwise you could have a mix of two (or even more) branches in IRIS that can lead to unexpected behaviour.

0
Gautam Rishi  Jun 9, 2023 to Evgeny Shvarov

Does that mean I should run IRIS system in docker instead of installing it on my host machine?

0
Evgeny Shvarov  Jun 9, 2023 to Gautam Rishi

It is your choice, but I personally recommend to use IRIS as docker images for development.

It is very convenient and this approach eliminates a gazillion problems you can met developing with IRIS desktop.

0
Gautam Rishi  Jun 9, 2023 to Evgeny Shvarov

How about zpm install "git-source-control" 
what exactly it do. Also, can I manage to run git commit and other statements as we do from terminal in vscode or it is specific to UI only.

0
Evgeny Shvarov · Jun 7, 2023

Hi Gautam!

You can start from this template - it is a ready-made template that provides git, docker, ipm and unit-testing development environment.

0