<?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 Ulysses Salinas on Medium]]></title>
        <description><![CDATA[Stories by Ulysses Salinas on Medium]]></description>
        <link>https://medium.com/@ulysses.salinas88?source=rss-d21d3fe885ca------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*OTVdjU-HlB5V8UY1.jpg</url>
            <title>Stories by Ulysses Salinas on Medium</title>
            <link>https://medium.com/@ulysses.salinas88?source=rss-d21d3fe885ca------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 18 Nov 2026 17:52:14 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@ulysses.salinas88/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-ting It Done With Stash]]></title>
            <link>https://medium.com/@ulysses.salinas88/git-ting-it-done-with-stash-7ed20d7519fc?source=rss-d21d3fe885ca------2</link>
            <guid isPermaLink="false">https://medium.com/p/7ed20d7519fc</guid>
            <category><![CDATA[stash]]></category>
            <category><![CDATA[git]]></category>
            <dc:creator><![CDATA[Ulysses Salinas]]></dc:creator>
            <pubDate>Tue, 28 May 2024 15:08:50 GMT</pubDate>
            <atom:updated>2024-05-28T15:08:50.340Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/752/1*KSzglr2TfpuCyZ4I1cMekA.jpeg" /></figure><p>Within the realm of software development, version control is king, and because of this, how changes are managed is critical to the outcome of a project. Git undoubtedly offers a set of powerful tools for version control; however, one command that I feel might be overlooked is ‘git stash’. I believe this command can help streamline the development process. In this article, I’ll explore how the ‘git stash’ command can be a game changer, especially for those who might not be familiar with its power.</p><h3>What on Earth is Git Stash?</h3><p>The ‘git stash’ command will provisionally shelf (or stash) changes made to a working directory, so that more work might be done elsewhere, allowing you to come back and re-apply those changes later. This command can be useful in various situations, such as:</p><ul><li>Checking out branches without committing unfinished work.</li><li>Securing changes while pulling and merging updates from a repository.</li><li>Experimenting without committing to the main project.</li></ul><h3>How I Use Git Stash</h3><p>Now, how I use ‘git stash’ might be considered unorthodox, but it has proven to be extremely helpful for me in maintaining a smooth workflow. Here‘s the typical scenario: Because I usually start hacking away before I actually create a local feature branch, when the time finally comes to create that feature branch, I first stash all my changes to get a clean workspace going again. This way, I can pull the latest changes that the remote main branch might have merged in while I was coding away. I will then apply my stashed changes to see if they play nice with the latest version of main. Any conflicts that arise during this process will be handled before I finally stash my neatly fitted changes again. I will then create my local feature branch and apply my latest stash. This approach helps me minimize any conflicts that might arise when submitting a pull request and sees to it that my changes will be compatible with the remote main branch during that process.</p><h3>Using Git Stash</h3><ol><li><strong>Stash</strong>: To stash your changes, run:</li></ol><pre>git stash save “Write a small description of what you are stashing”</pre><p>This command will remove any changes from your working directory and save them in a secluded area.</p><p>2. <strong>List</strong>: Want to see what stashes you have created? List them with:</p><pre>git stash list</pre><p>3. <strong>Apply/Pop: </strong>When you are ready to resume work from where you left off, apply the stashed changes with:</p><pre>git stash apply</pre><p>I am terribly guilty of not deleting my stashes right after they are applied. “You just never know,” I tell myself. If that’s not telling, I think I might have a few empty iPhone cases lying around the house somewhere.</p><p>Git stashes can last indefinitely, so you might want to consider deleting them when you feel it is time.</p><p>If you want to apply the most recent stash while also removing it from your stash list, you can run:</p><pre>git stash pop</pre><p>You can also specify which stash among your stash list you are wanting to pop or apply. Because each stash entry is assigned an index number (zero being your most recent stash), you can specify which stash you want to apply by targeting the index number.</p><p>Suppose you want to pop or apply some changes you stashed two stashes ago. You can run:</p><pre>git stash pop stash@{1}<br><br>or <br><br>git stash apply stash@{1}</pre><p>4. <strong>Drop:</strong> If you want to delete your most recent stash after applying it or just decide not to use it at all, you can drop it. Again, you can also target a specific stash in the list to drop by using an index number:</p><pre>git stash drop <br><br>or<br><br>git stash drop stash@{1}</pre><h3>Personal Experience</h3><p>There was once a time that I had lost all my changes due to an unexpected merge conflict, but because I had them safely stashed away, I was able to recover them without any loss. That incident is a testament to how ‘git stash’ just might save the day!</p><h3>Conclusion</h3><p>‘git stash’ might not be deemed a major feature amongst all the Git commands; however, I believe its impact on workflow efficiency is solid. By implementing the act of stashing into your Git routine, you might find that it helps keep your project clean and minimizes the risk of conflicts. Whether you are a senior developer or just getting your feet wet, consider giving ‘git stash’ a try; it might just change how you think about managing your code changes.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7ed20d7519fc" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>