DEV Community

Gajender Tyagi
Gajender Tyagi

Posted on

Git on IBMi

Simple guide for getting git on powerSystem

What is git ?

Git is a free and open source distributed version control system designed to handle everything from small to very large projects with speed and efficiency. The Git feature that really makes it stand apart from nearly every other SCM out there is its branching model. Git link:

Git runs in PASE in powersystem and it can be used for version control by keeping sources in IFS.

How to setup git on you machine.

  • You need yum package manager first.

  • CALL QP2TERM on your 5250 command line. This will open a shell.

  • Run the following commands to set path

    PATH=/QOpenSys/pkgs/bin:$PATH && export PATH
     yum install git 

Now Git is installed on your system

Get started with Git on IBMi

Actually Git runs in PASE environment in IBMi on powerSystem so you need to work with IFS files to use git.

Steps to git

  • call qp2term
  • pwdto check present working directory
  • if you dont want to use the pwd for git use **cd /path/to/direcory
  • mkdir gitrepo IFS is case sensitive
  • cd gitrepo
  • git init - initialize cd as git repo
  • touch mypgm.rpgle creates a new file mypgm.rpgle
  • Make some changes in mypgm.rpgle and save those changes.
  • git add mypgm.rpgle - add mypgm.rpgle to staging area(where changes will be tracked)
  • git commit -m "my comments for code changes " - moves mypgm.rpgle to repository. this is the flow

I have covered just the getting started part, there is more to git and how you can benefit from it.

Top comments (0)