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.
Comments
Hi - I'd recommend looking at https://github.com/intersystems/git-source-control and watching a few of these videos:
https://www.youtube.com/watch?v=elVQEU9MitE&pp=ygUuZ2l0IHNocmFlZCBkZXZl…
https://www.youtube.com/watch?v=Fh0uyC9owyE&pp=ygUuZ2l0IHNocmFlZCBkZXZl…
https://www.youtube.com/watch?v=QIb2ksEXdHk&pp=ygUuZ2l0IHNocmFlZCBkZXZl…
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.
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.
what about if I am switching branches in my git repo how is that managed in the IRIS instance?
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.
Does that mean I should run IRIS system in docker instead of installing it on my host machine?
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.
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.
Here is another video that updates the class and commits changes to the repo
Hi Gautam!
You can start from this template - it is a ready-made template that provides git, docker, ipm and unit-testing development environment.