<?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: Adeel Hussain</title>
    <description>The latest articles on DEV Community by Adeel Hussain (@thelonegunner).</description>
    <link>https://dev.to/thelonegunner</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%2F226018%2F90e6681a-3b19-4199-a574-1b7a56152eee.png</url>
      <title>DEV Community: Adeel Hussain</title>
      <link>https://dev.to/thelonegunner</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/thelonegunner"/>
    <language>en</language>
    <item>
      <title>Devs how much does an extra screen help in programming like reading documentation while coding etc</title>
      <dc:creator>Adeel Hussain</dc:creator>
      <pubDate>Sat, 13 Jun 2020 17:56:00 +0000</pubDate>
      <link>https://dev.to/thelonegunner/devs-how-much-does-an-extra-screen-help-in-programming-like-reading-documentation-while-coding-etc-499</link>
      <guid>https://dev.to/thelonegunner/devs-how-much-does-an-extra-screen-help-in-programming-like-reading-documentation-while-coding-etc-499</guid>
      <description>

</description>
      <category>discuss</category>
      <category>help</category>
      <category>codenewbie</category>
    </item>
    <item>
      <title>Notes on Git</title>
      <dc:creator>Adeel Hussain</dc:creator>
      <pubDate>Fri, 20 Dec 2019 11:48:25 +0000</pubDate>
      <link>https://dev.to/thelonegunner/notes-on-git-4igo</link>
      <guid>https://dev.to/thelonegunner/notes-on-git-4igo</guid>
      <description>&lt;p&gt;So in this post I will try and discuss the basics of git branch and git merge.&lt;/p&gt;

&lt;p&gt;Since my development environment is ubuntu so setup is in ubuntu but for windows and mac i think you can install a &lt;a href="https://git-scm.com/downloads" rel="noopener noreferrer"&gt;desktop client&lt;/a&gt; that also installs it for cli. &lt;/p&gt;

&lt;p&gt;But for ubuntu you can start by installing git&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;sudo apt-get install git&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;So let's start by making a repo&lt;/p&gt;

&lt;p&gt;make a directory&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;mkdir pydatastruct &amp;amp;&amp;amp; cd "$_"&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Now initializing the git repo with&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;git init&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fjjyx7lhp18lxx82mppd3.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fjjyx7lhp18lxx82mppd3.png" alt="Initializing a repo"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now let's run a git status &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;git status&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fb2pohx8elh83nzqf2d0j.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fb2pohx8elh83nzqf2d0j.png" alt="Git Status"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;We are on the master branch and right now we have no files so let's add a file and make a first commit to the master branch to the master branch&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;git add .&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;git commit -m "First Commit"&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fa1uonk79l84576myg2p4.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fa1uonk79l84576myg2p4.png" alt="First Commit"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Checking the git log to check the commit&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;git log --decorate --oneline&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fag4ybuhl1s3h6a32wi3z.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fag4ybuhl1s3h6a32wi3z.png" alt="Git Log"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now let's make branches. Since I am going to add a linkedlist, a stack and a queue I will make three branches. The most important thing about making a branch is that the branch points to the commit it is made at so all three branches will point at the master branch right now.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;git branch linkedlist&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;git branch stack&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;git branch queue&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fp4rj3o0gy9c943yx04tj.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fp4rj3o0gy9c943yx04tj.png" alt="Git Branch"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now let's checkout to the branch add a file make a commit for all the three branches. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;git checkout linkedlist&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;touch linkedlist.py&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;git add .&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;git commit -m "Added linkedlist&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fupix2bxt2twnmbxil7ni.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fupix2bxt2twnmbxil7ni.png" alt="Added Linkedlist"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now checking the git log for this branch&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fc87i5xk2ymphln6g3ycn.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fc87i5xk2ymphln6g3ycn.png" alt="Git log"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;As you can see branches master stack and queue are at the same commit whereas linkedlist is not at a different commit. &lt;/p&gt;

&lt;p&gt;Similarly for branches stack and queue and you will have three branches&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fkzqodkq9743ti2lzlh5t.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fkzqodkq9743ti2lzlh5t.png" alt="First commit to stack"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fmftsso1q3eo1rdrte1t9.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fmftsso1q3eo1rdrte1t9.png" alt="First commit to queue"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now you can make individual changes on the branches and implement linkedlist, stack and queue through the same process of making commits. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fp3eqeo1ymqnjwmia8asr.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fp3eqeo1ymqnjwmia8asr.png" alt="Linkedlist after changes"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fyblbq6uov0e09aj40lxd.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fyblbq6uov0e09aj40lxd.png" alt="Stack after changes"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Ff4d8083gg66or13tbh3i.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Ff4d8083gg66or13tbh3i.png" alt="queue after changes"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;As all the branches are two commits ahead of master it's time to merge them to master. Right now since I haven't edited main.py there is no merge conflict. So just check out and run git merge&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;git checkout master&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;git merge linkedlist&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;git merge stack&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;git merge queue&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fnwgonc7xmwkuhl74go2d.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fnwgonc7xmwkuhl74go2d.png" alt="git merge linkedlist"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fieptzgg6bltdvtnrpufe.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fieptzgg6bltdvtnrpufe.png" alt="git merge stack"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2F17c8kqek64t01ve2ruz3.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2F17c8kqek64t01ve2ruz3.png" alt="git merge queue"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now when you check the git log on master branch you can see all the commits at one place. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fi4en56yx4afg3kuc9p12.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fi4en56yx4afg3kuc9p12.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Next time I will look into the details of recursive merge and add a remote repository. &lt;/p&gt;

</description>
      <category>git</category>
      <category>beginners</category>
    </item>
  </channel>
</rss>
