<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Ahmed Haitham on Medium]]></title>
        <description><![CDATA[Stories by Ahmed Haitham on Medium]]></description>
        <link>https://medium.com/@haithamelsersy5060?source=rss-bc59ea55152a------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*Eyc7cfQ8w4HGFkX_</url>
            <title>Stories by Ahmed Haitham on Medium</title>
            <link>https://medium.com/@haithamelsersy5060?source=rss-bc59ea55152a------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 28 Nov 2026 08:02:41 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@haithamelsersy5060/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Git Details]]></title>
            <link>https://medium.com/@haithamelsersy5060/git-details-9109ca9c749f?source=rss-bc59ea55152a------2</link>
            <guid isPermaLink="false">https://medium.com/p/9109ca9c749f</guid>
            <category><![CDATA[version-control]]></category>
            <category><![CDATA[project-management]]></category>
            <category><![CDATA[version-control-with-git]]></category>
            <category><![CDATA[github]]></category>
            <category><![CDATA[git]]></category>
            <dc:creator><![CDATA[Ahmed Haitham]]></dc:creator>
            <pubDate>Fri, 04 Oct 2024 21:38:30 GMT</pubDate>
            <atom:updated>2024-10-05T04:39:01.112Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/1*bsKRj8C1-ZCphxPL5Jav5A.png" /></figure><p>Hey there again so last time we talked about VCSs if you are new here I recommend that you go back to the <a href="https://medium.com/@haithamelsersy5060/git-started-ec116f89bc29">previous blog</a>.</p><p>In this blog, we will talk more about Git as a VCS how it started, and what makes it different from the others this should tell you more about why to choose Git as your VCS ( the decision is yours at the end ).</p><h3>History Lesson</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/400/1*YqrL2tKcGW-YjE6afW-mlw.gif" /></figure><p>During the early ages of Linux kernel updates and changes were passed in patches and archived files in 2002 it began using a DVCS called Bitkeeper due to some conflicts the free-of-charge status was revoked.</p><p>Linux development community led by Linus Travolds(the creator of Linux) decided to make their own VCS based on the lessons they learned from using BitKeeper, some of the goals of this system were:</p><ol><li>speed</li><li>simple design</li><li>Strong support for non-linear development (thousands of parallel branches)</li><li>Fully distributed</li><li>Able to handle large projects like the Linux kernel efficiently (speed and data size)</li></ol><p>so enough with the history lesson and what you may consider a commercial and let’s get to the details</p><h3>What is Git?</h3><p>I know I may sound like a fan (which is true actually 😅😅) but the purpose of the blog is getting to know the details of how Git work so you can use it efficiently .</p><p>As expected from the evolution of the VCSs Git is a DVCS but what makes Git different is the way it thinks about it’s data and deals with it.</p><p><strong>Snapshots:</strong></p><p>Most VCSs stores it’s data as deltas (files and changes made to these files)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*iRMDICoe6Eo9JttdupEVFg.jpeg" /></figure><p>To be more efficient Gits stores it’s data as a stream of snapshots every time you commit (commiting is saving a checkpoint) Git takes a picture of how your files looks like now what if one of the files hasn’t changed? it only stores a link for the last snapshot of it .</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*s781g6ZmQLrBf2aLmt_Oag.jpeg" /></figure><p>Thinking this wasy makes Git different from nearly any other VCS as it makes it reconsider every aspect of version control that other systems has copied from the previous generation, we’ll explore some of the benefits Git gained from this approach when we talk about branches Later on.</p><p><strong>Locality:</strong></p><p>With Git there is a little you can’t do when offline so there is no matter where you are on a bus a train or just at home you can just get on your PC and just finish some of your tasks and commit it to your local version of the repository and you can upload it to the server later you can also access all the old commits as you already have your own version of the project most of these functions aren’t possible on other VCSs</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/499/1*6P-Twlg6v2WWTvDkTtQvvA.gif" /><figcaption>CVCS users getting enlightened by these facts</figcaption></figure><p><strong>Git only adds data:</strong></p><p>Every small action you do is saved in Git this can help you to easily undo any action that screwed your project up and also makes it hard to lose any data but note that any changes that hasn’t been commited can easily be lost but generally speaking if you commit and push your changes regularly you are safe</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/480/1*J1G5ZNatcd0QB2eHQJaBkQ.gif" /><figcaption>Git taking care of your commits</figcaption></figure><p><strong>The Three States (Important):</strong></p><p>Git has three file states modified, staged, and committed</p><ol><li>Modified: a change has been made to the file</li><li>Staged: you finished your work with this file and you want to commit it (you are letting Git know it has to save the current version of the file in the next commit)</li><li>Commited: an Image (version) of your staged files has been made</li></ol><p>This leads us to the three main sections of Git the working tree, the staging area, and the Git directory.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SGLTuBG33eS-XJ0pChjh5Q.jpeg" /><figcaption>this drawing illustrates where is your file in each one of it’s states</figcaption></figure><ol><li>Working Directory: a single version that is taken out to you from the comprissed data base and placed on the disk for you to modify consider your virtual disk where you are working (and just like the disk when you leave the unfinished wor on it for long some stuff may be lost).</li><li>Staging Area: a file that containes information about what will go in your next commit it’s technical name is the “index” but staging ares is the one most commonly used.</li><li>Git Directory: this is the most important part of Git where it stores metadatat for your project (it is what is copied when you clone a repository from another computer)</li></ol><p>The basic Git workflow goes something like this:</p><ol><li>You modify files in your working tree.</li><li>You selectively stage just those changes you want to be part of your next commit, which adds only those changes to the staging area.</li><li>You do a commit, which takes the files as they are in the staging area and stores that snapshot permanently to your Git directory.</li></ol><h3>Summary and notes</h3><p>So for this blogs we started to concentrate only on git not VCSs in general this might have been alot but an important part of using a tool efficiently is understanding how it works that’s why we have gone through nearly all the details of Git from it’s history to how it’s working under the hood hope this has been rewarding for you, next time inshallah we’ll start using Git I won’t cover the installation of Git in this blog there is many tools to use to work with git but it’s most recommended to use the command line which is <a href="https://git-scm.com/downloads">Git bash</a> cause it enables you to run all Git commands there is alot of GUI tools but they allow you to implement a subset of commands only for simplicity also you can figure out the GUI yourself while the opposit isn’t necessarily correct so just like the book we will stick with the command line see you next time</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9109ca9c749f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Git Started]]></title>
            <link>https://medium.com/@haithamelsersy5060/git-started-ec116f89bc29?source=rss-bc59ea55152a------2</link>
            <guid isPermaLink="false">https://medium.com/p/ec116f89bc29</guid>
            <category><![CDATA[github]]></category>
            <category><![CDATA[project-management]]></category>
            <category><![CDATA[git]]></category>
            <category><![CDATA[version-control]]></category>
            <category><![CDATA[software-development]]></category>
            <dc:creator><![CDATA[Ahmed Haitham]]></dc:creator>
            <pubDate>Sat, 28 Sep 2024 15:20:05 GMT</pubDate>
            <atom:updated>2024-10-11T18:11:55.387Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/1*bsKRj8C1-ZCphxPL5Jav5A.png" /></figure><p>this series of blogs should help you grasp all the basic concepts that will help you work efficiently through all your project</p><h3><strong>Who can benefit from these blogs?</strong></h3><p>these blogs are based on P<a href="https://git-scm.com/book/en/v2">roGit</a> so it is suitable for anyone from a beginner who doesn&#39;t know anything about Git to those experienced in working with Git.</p><p>As a software developer when you are editing your code usually, you fear that the changes you are making may cause everything to crash so you typically choose one of these solutions</p><p>1- comment the code rather than deleting</p><p>2- copy the code to a text file for example</p><p>doing this you are keeping versions of your code you could also mark your versions to remember what was saved in this version like writing a short description in your comments or naming your files</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/777/1*8vhWwEnOo3kwJhV6dJyFOQ.jpeg" /><figcaption>here you are leaving a comment rather than deleting the code</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/498/1*PcpeVWT9z_Wuf8eAIpnlJA.jpeg" /><figcaption>or you can use multiple files for this every file for a version</figcaption></figure><p>what you are doing right now is saving versions of your work that you can easily get back to when needed while simple this process can be incredibly tiring and error-prone you may forget where your copies were or that you even left copies to start with ( I can’t seem to remember what I had for lunch yesterday)</p><p>to tackle these problems programmers came up with what was called Local VCSs (Version Control Systems) that had a simple database that kept all changes to file under revision control.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/428/1*iKgrH1w3Gf0kjZ04GOyxaA.png" /></figure><p>one of the most popular VCSs was RCS it worked by keeping patch sets by keeping patch sets ( each version is a patch set which is the changes made in files saved on the disk in a special format) it can then recreate any version by adding up all the patches till this version.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2FCDlU1CjYqKLes73CgJ%2Ftwitter%2Fiframe&amp;display_name=Giphy&amp;url=https%3A%2F%2Fmedia.giphy.com%2Fmedia%2FCDlU1CjYqKLes73CgJ%2Fgiphy.gif%3Fcid%3Decf05e47g84dueadbuu6fvc5cxuzfoe99o5ozvqmkskugoav%26ep%3Dv1_gifs_search%26rid%3Dgiphy.gif%26ct%3Dg&amp;image=https%3A%2F%2Fmedia2.giphy.com%2Fmedia%2Fv1.Y2lkPTc5MGI3NjExZ3R1aXMyMWV4Zjk0dnZvdTBkaDh2dHJtdTJtMWw4emY2N3doMHh6eiZlcD12MV9pbnRlcm5hbF9naWZfYnlfaWQmY3Q9Zw%2FCDlU1CjYqKLes73CgJ%2Fgiphy.gif&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="244" frameborder="0" scrolling="no"><a href="https://medium.com/media/659cf5dde74f6ef0c50bfa6464b34d20/href">https://medium.com/media/659cf5dde74f6ef0c50bfa6464b34d20/href</a></iframe><p>Once you get up off your disk and discover grass you’ll notice that in most cases, you’ll be working in a team, and at this point, I think you noticed it’s something the “local” VCS can’t handle.</p><p><strong>Centralized Version Control Systems</strong></p><p>To solve the previously mentioned problem CVCSs were developed your project will be kept on a server that manages the version control process and the user will be accessing the versioned files from the server</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/729/1*HH3htaGNDIrBJZa03swXIQ.png" /></figure><p>This setup offers huge advantages over local VCSs. Now access is controlled more easily as everything is collected in one place and progress is monitored as everyone knows to a certain degree what the others are doing.</p><p>The Catch here is while collecting everything in one place was good it came with a Tax$ If the server is down we have to wait till it’s fixed and if the disk that the central database is on becomes corrupt and no proper backup was made everything is lost except for whatever single snapshot that may happen to be saved on any local machine.</p><p><strong>Distributed Version Control Systems</strong></p><p>In the DVCSs the client isn&#39;t only taking a snapshot of what on the server but it’s mirroring a complete copy of it (cloning) making every clone a valid backup for the server.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/729/1*Z1n4jTyj2g8xS-LAsdyzLg.png" /></figure><p>Most DVCSs can handle multiple remotes (multiple servers that contain the repository) this allows you to collaborate with different groups of people in different ways within the same project allowing several types of workflows that aren’t possible in centralized systems.</p><p><strong>summary</strong></p><p>So now we discussed the need to use VCSs and how they developed over time the next blog will be about Git itself and how it’s working behind the hood here’s a link to it: <a href="https://medium.com/@haithamelsersy5060/git-details-9109ca9c749f">Git Details</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ec116f89bc29" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>