<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Gajender Tyagi</title>
    <description>The latest articles on DEV Community by Gajender Tyagi (@gajendertyagi).</description>
    <link>https://dev.to/gajendertyagi</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F358080%2Fcd1f080f-57c5-4e5a-8121-ace172c72aef.png</url>
      <title>DEV Community: Gajender Tyagi</title>
      <link>https://dev.to/gajendertyagi</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/gajendertyagi"/>
    <language>en</language>
    <item>
      <title>Git on IBMi </title>
      <dc:creator>Gajender Tyagi</dc:creator>
      <pubDate>Sun, 19 Apr 2020 05:18:05 +0000</pubDate>
      <link>https://dev.to/gajendertyagi/git-on-ibmi-2edf</link>
      <guid>https://dev.to/gajendertyagi/git-on-ibmi-2edf</guid>
      <description>&lt;h2&gt;
  
  
  Simple guide for getting git on powerSystem
&lt;/h2&gt;

&lt;h3&gt;
  
  
  What is git ?
&lt;/h3&gt;

&lt;p&gt;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: &lt;a href="https://git-scm.com/"&gt;https://git-scm.com/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Git runs in PASE in powersystem and it can be used for version control by keeping sources in IFS. &lt;/p&gt;

&lt;h3&gt;
  
  
  How to setup git on you machine.
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;You need yum package manager first. &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://bitbucket.org/ibmi/opensource/src/master/docs/yum/#markdown-header-online-install-instructions-without-acs-open-source-management-tool"&gt;Easiest step&lt;/a&gt; &lt;/li&gt;
&lt;li&gt;
&lt;a href="https://bitbucket.org/ibmi/opensource/src/master/docs/yum/"&gt;Details here&lt;/a&gt; &lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;CALL QP2TERM&lt;/code&gt; on your 5250 command line. This will open a shell. &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Run the following commands to set path&lt;br&gt;&lt;br&gt;
&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight shell"&gt;&lt;code&gt;    &lt;span class="nv"&gt;PATH&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;/QOpenSys/pkgs/bin:&lt;span class="nv"&gt;$PATH&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="nb"&gt;export &lt;/span&gt;PATH
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Basic yum command &lt;a href="https://bitbucket.org/ibmi/opensource/src/master/docs/yum/#markdown-header-yum-cheat-sheet"&gt;click here&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;For git use this
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight shell"&gt;&lt;code&gt;     yum &lt;span class="nb"&gt;install &lt;/span&gt;git 
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;&lt;em&gt;Now Git is installed on your system&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Get started with Git on IBMi
&lt;/h3&gt;

&lt;p&gt;Actually Git runs in PASE environment in IBMi on powerSystem so you need to work with IFS files to use git. &lt;/p&gt;

&lt;h4&gt;
  
  
  Steps to git
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt; &lt;code&gt;call qp2term&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt; &lt;code&gt;pwd&lt;/code&gt;to check present working directory &lt;/li&gt;
&lt;li&gt; if you dont want to use the pwd for git use **cd /path/to/direcory&lt;/li&gt;
&lt;li&gt; &lt;code&gt;mkdir gitrepo&lt;/code&gt; IFS is case sensitive
&lt;/li&gt;
&lt;li&gt; &lt;code&gt;cd gitrepo&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt; &lt;code&gt;git init&lt;/code&gt; - initialize cd as git repo&lt;/li&gt;
&lt;li&gt; &lt;code&gt;touch mypgm.rpgle&lt;/code&gt; creates a new file mypgm.rpgle&lt;/li&gt;
&lt;li&gt; Make some changes in mypgm.rpgle and save those changes.&lt;/li&gt;
&lt;li&gt; &lt;code&gt;git add mypgm.rpgle&lt;/code&gt; - add mypgm.rpgle to staging area(where changes will be tracked)&lt;/li&gt;
&lt;li&gt; &lt;code&gt;git commit -m "my comments for code changes "&lt;/code&gt; - moves mypgm.rpgle to repository. 
&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--8Rm5KKt8--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://upload.wikimedia.org/wikipedia/commons/2/29/Git_data_flow.png" alt="this is the flow" title="git work flow"&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;I have covered just the getting started part, there is more to git and how you can benefit from it. &lt;/p&gt;
&lt;/blockquote&gt;

</description>
      <category>git</category>
      <category>ibmi</category>
      <category>rpgle</category>
      <category>as400</category>
    </item>
  </channel>
</rss>
