<?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 Trent Hugo on Medium]]></title>
        <description><![CDATA[Stories by Trent Hugo on Medium]]></description>
        <link>https://medium.com/@hieupxtn?source=rss-bd5350a81012------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*7iiM5qp68vm6sKXZFmYsTA.png</url>
            <title>Stories by Trent Hugo on Medium</title>
            <link>https://medium.com/@hieupxtn?source=rss-bd5350a81012------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 28 Nov 2026 19:38:34 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@hieupxtn/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: The Complete Beginner-to-Advanced Guide]]></title>
            <link>https://medium.com/@hieupxtn/git-the-complete-beginner-to-advanced-guide-6dd350d51426?source=rss-bd5350a81012------2</link>
            <guid isPermaLink="false">https://medium.com/p/6dd350d51426</guid>
            <category><![CDATA[git-internals]]></category>
            <category><![CDATA[advanced-command]]></category>
            <category><![CDATA[gitflow-workflow]]></category>
            <category><![CDATA[feature-branch-workflow]]></category>
            <category><![CDATA[merging-workflows]]></category>
            <dc:creator><![CDATA[Trent Hugo]]></dc:creator>
            <pubDate>Mon, 29 Dec 2025 01:26:08 GMT</pubDate>
            <atom:updated>2025-12-29T01:26:08.424Z</atom:updated>
            <content:encoded><![CDATA[<p>Git is the most widely used version control system in software development. It allows developers to track changes, collaborate on projects, and manage code history efficiently. This guide takes you from beginner concepts to advanced techniques, with practical examples, clear explanations, and diagrams for better understanding.</p><h3>Table of Contents</h3><p>What is Git? How It Works</p><p>1. Git Basics</p><ul><li>git init</li><li>git add</li><li>git commit</li><li>git status</li><li>git log</li></ul><p>2. Branching and Merging</p><ul><li>git branch</li><li>git checkout</li><li>git merge</li><li>git rebase</li><li>git cherry-pick</li></ul><p>3. Undoing and Stashing Changes</p><ul><li>git reset</li><li>git revert</li><li>git stash</li></ul><p>4. Remote Repositories</p><ul><li>git remote</li><li>git fetch</li><li>git pull</li><li>git push</li><li>git clone</li></ul><p>5. Advanced Git Concepts</p><ul><li>Git Snapshot System</li><li>Branching Strategies</li><li>Rebasing vs Merging</li><li>Resolving Conflicts</li></ul><p>6. Practical Git Workflows</p><p>7. Conclusion</p><h3>What is Git? How It Works</h3><p>Git is a <strong>distributed version control system</strong>. Unlike older systems, Git stores <strong>snapshots</strong> of your entire project rather than just differences. Each commit represents a full snapshot of your project.</p><p><strong>Key concepts:</strong></p><ul><li><strong>Commit:</strong> A snapshot of your project at a point in time.</li><li><strong>Branch:</strong> A movable pointer to a series of commits.</li><li><strong>HEAD:</strong> Points to the current commit you are working on.</li><li><strong>Staging area:</strong> Where changes are prepared before committing.</li><li><strong>Remote repository:</strong> A copy of your repository on another server (like GitHub).</li></ul><p><strong>Diagram Idea:</strong></p><ul><li>Repository as a folder</li><li>Commits as circles forming a tree</li><li>Branch pointer labeled “master”</li><li>HEAD pointing to latest commit</li></ul><h3>1. Git Basics</h3><h3>git init</h3><p>Initialize a new Git repository:</p><pre>mkdir my-project<br>cd my-project<br>git init</pre><ul><li>Creates a .git folder to track commits.</li><li>After initialization, your folder becomes a Git repository.</li></ul><p><strong>Diagram Idea:</strong></p><ul><li>Empty folder → .git directory added</li><li>Arrow labeled git init</li></ul><h3>git add</h3><p>Stages changes to prepare for commit:</p><pre>git add file1.txt<br>git add .</pre><ul><li>Think of this as adding files to a shopping cart.</li><li>Only staged files are included in the next commit.</li></ul><p><strong>Diagram Idea:</strong></p><ul><li>Files → Staging Area → Commit</li></ul><h3>git commit</h3><p>Saves changes as a snapshot:</p><pre>git commit -m &quot;Initial commit&quot;</pre><ul><li>Commits include metadata: author, timestamp, message.</li><li>Use descriptive messages for clarity.</li></ul><p><strong>Diagram Idea:</strong></p><ul><li>Staging area → Commit node → Git tree</li></ul><h3>git status</h3><p>Check current state:</p><pre>git status</pre><p>Shows:</p><ul><li>Staged changes</li><li>Unstaged changes</li><li>Untracked files</li></ul><h3>git log</h3><p>View commit history:</p><pre>git log --oneline --graph --all</pre><ul><li>--graph shows tree structure</li><li>--all shows all branches</li></ul><p><strong>Diagram Idea:</strong></p><ul><li>Vertical Git tree with commits stacked</li></ul><h3>2. Branching and Merging</h3><h3>git branch</h3><p>Create and manage branches:</p><pre>git branch          # list branches<br>git branch dev      # create new branch</pre><ul><li>Branches allow parallel development.</li><li>By default, Git starts with a master (or main) branch.</li></ul><p><strong>Diagram Idea:</strong></p><ul><li>Master branch → branch off dev</li></ul><h3>git checkout</h3><p>Switch between branches:</p><pre>git checkout dev<br>git checkout -b feature</pre><ul><li>-b creates and switches in one step.</li><li>HEAD points to the current branch.</li></ul><p><strong>Diagram Idea:</strong></p><ul><li>HEAD pointer moving from master → dev</li></ul><h3>git merge</h3><p>Combine branches:</p><pre>git checkout master<br>git merge dev</pre><ul><li>Merges dev into master.</li><li>Conflicts may occur if same lines are changed.</li></ul><p><strong>Diagram Idea:</strong></p><ul><li>Two branches → single merged branch</li></ul><h3>git rebase</h3><p>Move commits onto another base:</p><pre>git checkout dev<br>git rebase master</pre><ul><li>Creates linear history.</li><li>Avoid rebasing shared public branches.</li></ul><p><strong>Diagram Idea:</strong></p><ul><li>Commits from dev “replayed” onto master</li></ul><h3>git cherry-pick</h3><pre>git cherry-pick &lt;commit-hash&gt;</pre><ul><li>Apply specific commit from another branch</li></ul><p><strong>Diagram Idea:</strong></p><ul><li>Branches diverging and merging or rebasing</li></ul><h3>3. Undoing and Stashing Changes</h3><h3>git reset</h3><p>Move HEAD and optionally unstage changes:</p><pre>git reset HEAD file1.txt   # unstage<br>git reset --hard HEAD~1    # remove last commit</pre><p><strong>Diagram Idea:</strong></p><ul><li>HEAD moving backward → commits removed</li></ul><h3>git revert</h3><p>Undo a commit by creating a new commit:</p><pre>git revert HEAD</pre><ul><li>Safe for public repositories.</li></ul><p><strong>Diagram Idea:</strong></p><ul><li>Original commit → Revert commit</li></ul><h3>git stash</h3><p>Temporarily save changes:</p><pre>git stash<br>git stash pop</pre><ul><li>Useful when switching branches with uncommitted work.</li></ul><p><strong>Diagram Idea:</strong></p><ul><li>Changes stored in stash box → reapplied later</li></ul><h3>4. Remote Repositories</h3><h3>git remote</h3><p>Manage remotes:</p><pre>git remote add origin https://github.com/user/repo.git<br>git remote -v</pre><h3>git fetch</h3><p>Get updates from remote without merging:</p><pre>git fetch origin</pre><p><strong>Diagram Idea:</strong></p><ul><li>Remote → fetch → local repository</li></ul><h3>git pull</h3><p>Fetch + merge:</p><pre>git pull origin master</pre><p><strong>Diagram Idea:</strong></p><ul><li>Remote → fetch → merge → local branch</li></ul><h3>git push</h3><p>Send commits to remote:</p><pre>git push origin master</pre><p><strong>Diagram Idea:</strong></p><ul><li>Local commits → remote repository</li></ul><h3>git clone</h3><p>Copy a repository locally:</p><pre>git clone https://github.com/user/repo.git</pre><p><strong>Diagram Idea:</strong></p><ul><li>Remote repo → arrow → new local repo</li></ul><h3>5. Advanced Git Concepts</h3><h3>Git Snapshot System</h3><ul><li>Git tracks entire project snapshots.</li><li>Efficient storage: unchanged files are hard-linked.</li></ul><p><strong>Diagram Idea:</strong></p><ul><li>Snapshot tree with branches moving pointers</li></ul><h3>Branching Strategies</h3><ul><li><strong>Feature branches:</strong> New functionality</li><li><strong>Release branches:</strong> Production-ready code</li><li><strong>Hotfix branches:</strong> Urgent fixes</li></ul><p><strong>Diagram Idea:</strong></p><ul><li>Multi-branch tree merging into master</li></ul><h3>Merging vs Rebasing</h3><ul><li><strong>Merge:</strong> Maintains full history, may produce merge commits</li><li><strong>Rebase:</strong> Linear history, commits replayed</li></ul><p><strong>Diagram Idea:</strong></p><ul><li>Merge: branches converge with merge node</li><li>Rebase: commits move linearly</li></ul><h3>Resolving Conflicts</h3><ul><li>Git will mark conflicts in files with &lt;&lt;&lt;&lt;&lt;&lt;, ======, &gt;&gt;&gt;&gt;&gt;&gt;.</li><li>Resolve manually → git add → git commit.</li></ul><p><strong>Diagram Idea:</strong></p><ul><li>Conflict node → resolved → merged node</li></ul><h3>6. Practical Git Workflows</h3><ul><li><strong>Feature Branch Workflow:</strong> feature → dev → master</li><li><strong>Gitflow Workflow:</strong> Structured branching for releases</li><li><strong>Fork &amp; Pull Request:</strong> Used in open-source projects</li></ul><p><strong>Diagram Idea:</strong></p><ul><li>Multiple branches with arrows showing merge/pull requests</li></ul><h3>7. Conclusion</h3><p>Git is powerful but approachable:</p><ul><li>Commit frequently</li><li>Use branches for isolation</li><li>Understand merging and rebasing</li><li>Keep remotes in sync</li></ul><p>With this guide, you can confidently handle Git from beginner to advanced workflows.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6dd350d51426" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Git for Beginners: How It Really Works]]></title>
            <link>https://medium.com/@hieupxtn/git-for-beginners-how-it-really-works-e4220f6afab5?source=rss-bd5350a81012------2</link>
            <guid isPermaLink="false">https://medium.com/p/e4220f6afab5</guid>
            <category><![CDATA[version-control]]></category>
            <category><![CDATA[how-git-works]]></category>
            <category><![CDATA[git-workflow]]></category>
            <category><![CDATA[git-basics]]></category>
            <category><![CDATA[git-for-beginners]]></category>
            <dc:creator><![CDATA[Trent Hugo]]></dc:creator>
            <pubDate>Sun, 28 Dec 2025 19:43:30 GMT</pubDate>
            <atom:updated>2025-12-28T19:43:30.978Z</atom:updated>
            <content:encoded><![CDATA[<p>If you’re new to programming or collaborating on code, you’ve probably heard of <strong>Git</strong>. But what is it, and why do so many developers swear by it? Let’s break it down in simple terms.</p><h3>What is Git?</h3><p>Git is a <strong>version control system</strong>. Think of it as a <strong>super-powered “undo button”</strong> for your code. It tracks changes, keeps history, and helps multiple people work on the same project without chaos.</p><p>Imagine writing a book. Without Git, you might save multiple copies: Book_v1.doc, Book_v2.doc, Book_final.doc. It’s messy. Git lets you <strong>track changes</strong>, go back to previous versions, and collaborate with others without creating dozens of copies.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*eYmR6TUkNUqxj330mjTWBg.png" /><figcaption><strong>Git workflow</strong></figcaption></figure><h3>How Git Works</h3><h4>1. Repository — Your Project’s Home</h4><p>A <strong>repository</strong> (or “repo”) is where Git stores all your project files and history. You can create one on your computer or on platforms like <strong>GitHub</strong>.</p><pre>git init</pre><p>This command initializes a new Git repository in your folder. Now Git starts tracking changes!</p><h4>2. Staging Changes — Preparing for Save</h4><p>When you modify files, Git doesn’t automatically save them. First, you <strong>stage</strong> them:</p><pre>git add file.txt</pre><p>Think of staging as <strong>putting things in a shopping cart before checkout</strong>. You choose what changes to include in the next snapshot.</p><h4>3. Commit — Saving Your Progress</h4><p>A <strong>commit</strong> is like taking a snapshot of your project at a point in time:</p><pre>git commit -m &quot;Add homepage layout&quot;</pre><p>This records your changes along with a <strong>message</strong> describing what you did. You can always go back to this commit later.</p><h4>4. Branching — Experiment Safely</h4><p>A <strong>branch</strong> is a separate line of development. Want to try a new feature without messing up the main code?</p><pre>git branch new-feature<br>git checkout new-feature</pre><p>Now you can work freely. Later, you can merge it back into the main branch.</p><h4>5. Merging — Bringing Changes Together</h4><p>Once your feature is ready, merge it into the main branch:</p><pre>git checkout main<br>git merge new-feature</pre><p>Git will combine your changes. If two people modified the same line, Git will ask you to resolve the <strong>conflict</strong> manually.</p><h4>6. Pushing — Share with the World</h4><p>To share your work with others, push your commits to a remote repository (like GitHub):</p><pre>git push origin main</pre><p>Now your changes are online, safe, and accessible to collaborators.</p><h3>Why Git is Awesome</h3><ul><li><strong>Track history:</strong> Never lose work.</li><li><strong>Collaboration:</strong> Multiple people can work together seamlessly.</li><li><strong>Experiment safely:</strong> Try new ideas without breaking the main project.</li><li><strong>Restore anything:</strong> Go back to any previous version anytime.</li></ul><h3>Final Thoughts</h3><p>Git might feel confusing at first, but remember: it’s just a <strong>tool to keep your code organized and safe</strong>. Start small: create a repository, make commits, and experiment with branches. Soon, it will feel like second nature.</p><p>💡 <strong>Pro tip:</strong> Combine Git with platforms like <strong>GitHub</strong> or <strong>GitLab</strong> to collaborate, showcase your projects, and build your portfolio.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e4220f6afab5" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>