<?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 AlwaysEngineer on Medium]]></title>
        <description><![CDATA[Stories by AlwaysEngineer on Medium]]></description>
        <link>https://medium.com/@alwaysengineer0to9?source=rss-c6b7b4365831------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*uXmLm2dttawov2sT</url>
            <title>Stories by AlwaysEngineer on Medium</title>
            <link>https://medium.com/@alwaysengineer0to9?source=rss-c6b7b4365831------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 28 Nov 2026 20:17:10 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@alwaysengineer0to9/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 (Part-1) —  The BASICS]]></title>
            <link>https://medium.com/@alwaysengineer0to9/git-part-1-the-basics-422f61230fbd?source=rss-c6b7b4365831------2</link>
            <guid isPermaLink="false">https://medium.com/p/422f61230fbd</guid>
            <category><![CDATA[basics-of-git]]></category>
            <category><![CDATA[git-for-beginners]]></category>
            <category><![CDATA[what-is-git]]></category>
            <category><![CDATA[git]]></category>
            <dc:creator><![CDATA[AlwaysEngineer]]></dc:creator>
            <pubDate>Fri, 21 Jul 2023 06:47:01 GMT</pubDate>
            <atom:updated>2023-07-21T06:47:01.867Z</atom:updated>
            <content:encoded><![CDATA[<p>GIT (Part-1) — The BASICS</p><p>In the dynamic world of software development, staying ahead of the curve is essential for success. One powerful tool that has revolutionized collaboration, version control, and project management is Git. In this article, we will explore the significance of Git in software development, outlining its benefits and introducing you to some basic commands. But first, we need to understand the value it brings.</p><p><strong>Why Use Git?</strong></p><p><em>Think of Git as a big online storage space where you can keep all your project files. It’s like having a shared folder where everyone can access and contribute to the project. </em>So, it provides <strong>Centralized Storage</strong>.</p><p>Git allows you and your teammates to work on the same project simultaneously. Each person can make changes to the code, add new features, or fix bugs. Git keeps track of who made what changes and when so you can easily see the progress and contributions of each team member. So,<strong> Collaboration Made Easy</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*sUmiewWEtWb1W1TPuOp_uw.png" /></figure><p>With Git, you don’t have to worry about losing your work or overwriting someone else’s changes. It has a special feature called version control, which means it keeps a history of all the changes made to the project. If something goes wrong, you can go back to a previous version and start again from there. So,<strong> Version Control</strong>.</p><p>Git provides tools to help you collaborate smoothly. For example, you can leave comments on specific lines of code, ask questions, or suggest improvements. This helps you communicate with your teammates and have discussions about the project.</p><p>Git is not just for your team; it’s part of a larger community of developers. You can share your projects with others, get feedback, and even contribute to open-source projects created by developers worldwide. It’s a great way to learn from others and showcase your skills. So, <strong>Sharing and Learning</strong>.</p><p>Before we actually start using Git, we should understand the terms that confuse many, <strong>Local Repository</strong> and <strong>Origin</strong>( often referred to as Remote ) <strong>Repository</strong>. Let&#39;s understand quickly.</p><blockquote>Local Repository: The local repository refers to the copy of the project’s codebase that resides on your local machine. It includes the entire version history of the project, allowing you to make changes, commit them, and track the evolution of the code. You interact with the local repository directly through Git commands on your terminal or through Git clients. It serves as your primary workspace, where you develop and test your code.</blockquote><p>When you initialize a local repository using the git init command, Git creates a hidden .git folder, within your project directory. This folder contains all the necessary metadata and version history for your project. The local repository is self-contained, allowing you to work on your code independently without requiring a connection to the server or remote repository.</p><blockquote>Origin Repository (Remote Repository): The origin repository is the remote counterpart to your local repository. It typically resides on a remote server, such as GitHub. The remote repository acts as a centralized location where you can store and share your code with other team members or collaborators. It serves as a backup and allows for seamless collaboration on the same codebase.</blockquote><p>To synchronize your local repository with the origin repository, you establish a link between the two. This is typically done by adding a remote repository using the git remote add command. The remote repository is often referred to as origin by convention, although you can choose a different name if desired.</p><p>Once the link is established, you can use Git commands git push to upload your local commits to the origin repository and git pull to fetch and merge changes made in the origin repository into your local copy. This synchronization enables collaboration and allows multiple team members to work on the same codebase, sharing their changes and staying updated with the latest modifications.</p><p>Now, there are different approaches that demonstrate different ways of starting to work with Git repositories, either by creating a new repository and pushing to a remote or by forking an existing repository, creating a pull request, and collaborating with the original project. The choice depends on whether you are initiating a new project or contributing to an existing one.</p><blockquote><strong>Creating a New Repository and Pushing to Remote</strong></blockquote><p>When you want to start a new project or create your own repository from scratch, you can follow these steps:</p><pre>git init <br>git add &lt;file(s)&gt;<br>git commit -m &lt;Commit message&gt;<br>git remote add origin &lt;remote repository URL&gt;<br>git push origin &lt;branch&gt;</pre><ul><li>Initialize a local repository: Use the command <strong>git init </strong>in your project directory to create a new Git repository on your local machine.</li><li>Add and commit your code: Add your code files to the repository using <strong>git add &lt;file(s)&gt;</strong> and then commit the changes using</li><li><strong>git commit -m &lt;Commit message&gt; </strong>This records a snapshot of your code at that point in time.</li><li>Create a remote repository: On a platform like GitHub, create a new repository with a name and description that matches your project.</li><li>Connect your local repository to the remote: Use the command <strong>git remote add origin &lt;remote repository URL&gt; </strong>to link your local repository to the remote repository you just created.</li><li>Push your code to the remote repository: Use <strong>git push origin &lt;branch&gt; </strong>to upload your local commits to the remote repository, making them available to others.</li></ul><blockquote><strong>Forking an Existing Repository, Creating a Pull Request, and Merging</strong></blockquote><p>When you want to contribute to an existing project, you can follow these steps:</p><pre>git clone &lt;forked repository URL&gt;<br>git commit -m &lt;Commit message&gt;<br>git push origin &lt;branch&gt;</pre><ul><li>Fork the repository: On platforms like GitHub, click the “Fork” button on the repository’s page. This creates a copy of the repository under your GitHub account.</li><li>Clone the forked repository: On your local machine, use <strong>git clone &lt;forked repository URL&gt; </strong>to create a local copy of the forked repository.</li><li>Make changes and commit: Make the desired changes to the code in your local repository, stage them using git add &lt;file(s)&gt;, and commit the changes using <strong>git commit -m &lt;Commit message&gt;</strong>.</li><li>Push changes to your forked repository: Use <strong>git push origin &lt;branch&gt; </strong>to push your local commits to your forked repository on GitHub.</li><li>Create a pull request: On the original repository’s page, click the “<em>New pull request”</em> button to propose your changes. This notifies the original repository’s maintainers about your suggested modifications.</li><li>Collaborate and merge: The maintainers can review your changes, provide feedback, and eventually merge your pull request if they find the changes appropriate for the project.</li></ul><blockquote><strong>Cloning an Existing Repository</strong></blockquote><p>Instead of creating a new repository, you can directly clone an existing repository to your local machine. This is useful when you want to start working on an existing project without the need to create a new repository or fork it. To clone a repository, follow these steps:</p><pre>git clone &lt;repository URL&gt;<br>git add &lt;file(s)&gt;<br>git commit -m &lt;Commit message&gt;<br>git remote add origin &lt;remote repository URL&gt;<br>git push origin &lt;branch&gt;</pre><ul><li>Find the repository you want to work with, either on a platform like GitHub or through a URL.</li><li>On your local machine, open your terminal and navigate to the directory where you want to clone the repository.</li><li>Use the command <strong>git clone &lt;repository URL&gt; </strong>to clone the repository to your local machine. This will create a copy of the repository on your computer, including all the files and commit history.</li><li>Once the cloning process is complete, you can start working with the code, making changes and adding all the files, and finally, committing them locally.</li><li>If you have the necessary permissions, you can also push your changes to the remote repository to contribute to the project.</li></ul><blockquote><strong>Collaborating via Collaborative Development Platforms</strong></blockquote><p>Besides Git platforms like GitHub, there are other collaborative development platforms that provide Git-like features and workflows. These platforms, such as GitLab and Bitbucket, offer similar functionality to GitHub, including repository management, issue tracking, and pull requests. You can start working with repositories on these platforms by following their respective guidelines for creating and collaborating on projects.</p><p>Choose the approach that best suits your project’s needs and your preferred workflow.</p><p>By embracing Git as a core tool in your software development arsenal, you empower yourself and your team to build better software, collaborate seamlessly, and leverage the power of the global developer community. In this article, we discussed the benefits of using Git and provided an introduction to some essential commands. As you delve deeper into Git’s features and explore more advanced techniques, you’ll discover an ecosystem that fosters innovation, accelerates development, and propels your startup to new heights.</p><p>For now;</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/400/0*p9lPw1EOos78lTF2.gif" /></figure><p>hit the claps 👏,</p><p>Drop a comment/feedback.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=422f61230fbd" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>