<?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 Sourabh Gawande on Medium]]></title>
        <description><![CDATA[Stories by Sourabh Gawande on Medium]]></description>
        <link>https://medium.com/@sourabh_gawande?source=rss-2f066163a863------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*t7bQFqsX82RW_L7A</url>
            <title>Stories by Sourabh Gawande on Medium</title>
            <link>https://medium.com/@sourabh_gawande?source=rss-2f066163a863------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 29 Nov 2026 18:56:08 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@sourabh_gawande/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[How to use git reflog to find lost commits]]></title>
            <link>https://medium.com/kusho/how-to-use-git-reflog-to-find-lost-commits-d4701bdd3aed?source=rss-2f066163a863------2</link>
            <guid isPermaLink="false">https://medium.com/p/d4701bdd3aed</guid>
            <dc:creator><![CDATA[Sourabh Gawande]]></dc:creator>
            <pubDate>Mon, 15 Apr 2024 12:57:45 GMT</pubDate>
            <atom:updated>2024-04-15T12:57:45.254Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/960/0*vpCmVuVBR5OcjaAb.png" /></figure><p>Consider this scenario (this may or may not have happened to me 👀) — You check out a tag to do a prod release. The release is done and all looks good on prod. Now, you start working on a bug fix that’s been bothering your team for a while. After 4 hours and 200 LOC — it’s finally fixed. You commit your changes. Then you switch to a different branch to work on another feature. Git throws some warning, but that’s just git being git 🤷, so you just ignore it. 2 hours later you want to create a pull request for the bug fix but can’t find the commit anywhere. Cue panic!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*2yG3RPQ2XCYnDFEA" /></figure><h3>What happened here?</h3><p>When you checkout a tag, you’re in a detached HEAD state.</p><pre>You are in a &#39;detached HEAD&#39; state. You can look around, make experimental<br>changes, commit them, and you can discard any commits you make in this<br>state without impacting any branches by switching back to a branch.<br><br>If you want to create a new branch to retain the commits you create, you may<br>do so (now or later) by using -c with the switch command. Example:<br><br>git switch -c &lt;new-branch-name&gt;<br><br>Or undo this operation with:<br><br>  git switch -</pre><p>HEAD is a reference to your current position in the repo. When HEAD points to a branch, you’re in an attached HEAD state.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*oYid7YWxBHbkMcxF" /></figure><p>When HEAD points directly to a commit, you’re in a detached HEAD state.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*yUPUmhTaxjVeLuQy" /></figure><p>When you commit in this state, your commits don’t belong to any branch. When you switch away from this detached head state, Git shows a warning asking you to create a branch to retain your commits.</p><pre>Warning: you are leaving 1 commit behind, not connected to<br>any of your branches:<br><br>  9f45edc dummy commit<br><br>If you want to keep it by creating a new branch, this may be a good time<br>to do so with:<br><br> git branch &lt;new-branch-name&gt; 9f45edc</pre><p>If you don’t do that, your commits will not be part of any branch.</p><p>There are many ways to end up in a similar situation where you made some commits and you can’t find them at some later point. E.g. you made commits in a detached HEAD state and then forgot to create a branch, you did a git reset – hard origin/&lt;branch_name&gt; and then realized that there were some commits that you wanted to keep, etc.</p><p>So are these commits lost forever? Nope. git reflog to the rescue.</p><h3>What is Git reflog?</h3><p>From the official docs:</p><blockquote><em>Reference logs, or &quot;reflogs&quot;, record when the tips of branches and other references were updated in the local repository.</em></blockquote><p>You can think of Git reflog as an audit log of everything that you do (to the HEAD reference) in Git like commit changes, switch branches, etc. You can recover <em>almost</em> anything you do in git using reflog with some caveats.</p><ul><li>Reflog is periodically trimmed so you might not be able to recover very old commits</li><li>Reflog is local only so you’ll not be able to recover someone else’s commits from the origin</li></ul><h3>Now let’s take a look at how to recover lost commits using reflog</h3><ul><li>Find the commit using the git reflog command. Copy the commit hash from here once you’ve identified the commit you want to recover.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Zuh8bkziDj--FEWd" /></figure><ul><li>Cherry-pick that commit and add it to a branch using git cherry-pick &lt;commit_hash&gt;</li></ul><p>And just like that, you&#39;ve recovered your lost work and saved hours that you would&#39;ve spent redoing it!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d4701bdd3aed" width="1" height="1" alt=""><hr><p><a href="https://medium.com/kusho/how-to-use-git-reflog-to-find-lost-commits-d4701bdd3aed">How to use git reflog to find lost commits</a> was originally published in <a href="https://medium.com/kusho">KushoAI</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[OpenTofu: A Community-Driven Response to Terraform’s Licensing Change]]></title>
            <link>https://medium.com/kusho/opentofu-a-community-driven-response-to-terraforms-licensing-change-2f722c9fbed2?source=rss-2f066163a863------2</link>
            <guid isPermaLink="false">https://medium.com/p/2f722c9fbed2</guid>
            <category><![CDATA[development]]></category>
            <category><![CDATA[linux]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[terraform]]></category>
            <category><![CDATA[open-source]]></category>
            <dc:creator><![CDATA[Sourabh Gawande]]></dc:creator>
            <pubDate>Wed, 20 Sep 2023 16:59:05 GMT</pubDate>
            <atom:updated>2023-09-20T20:32:20.643Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="opentofu" src="https://cdn-images-1.medium.com/max/1024/1*H7zko5pPrRu8Sf7VTk8CpA.png" /></figure><blockquote>At <a href="https://kusho.co/">Kusho</a>, we’re are building a copilot for API testing so that you never have to manually test your APIs again. Kusho generates exhaustive tests for scenarios that can occur in production and executes them within your IDE.</blockquote><p>The Linux Foundation recently unveiled <a href="https://github.com/opentofu">OpenTofu</a>, a robust and community-driven alternative to <a href="https://www.terraform.io/">Terraform</a>, the widely used <a href="https://www.redhat.com/en/topics/automation/what-is-infrastructure-as-code-iac">infrastructure as code</a> provisioning tool. This announcement comes as a response to Terraform’s <a href="https://thenewstack.io/hashicorp-abandons-open-source-for-business-source-license/">controversial shift in licensing</a>, which transitioned from the open-source-friendly Mozilla Public License v2.0 (MPLv2) to a more restrictive Business Source License v1.1. OpenTofu steps in to offer developers and organizations a reliable, open source alternative under a neutral governance model.</p><h3>Terraform and Its Licensing Controversy</h3><p>Terraform has long been a linchpin in simplifying infrastructure management within cloud environments. Its ease of use and powerful capabilities have made it a go-to tool for DevOps teams worldwide. However, the recent licensing changes introduced by HashiCorp, the company behind Terraform, have raised significant concerns within the open source community. This shift threatened to restrict the freedom and accessibility that open source projects depend on.</p><h3>The Birth of OpenTofu</h3><p>Enter OpenTofu, originally known as OpenTF, a community-driven response to this licensing conundrum. OpenTofu aims to offer a genuinely open source alternative that stays true to the principles of open collaboration, impartiality, modularity, and backward compatibility. It’s designed to ensure that developers and organizations can continue leveraging infrastructure as code solutions without the encumbrance of restrictive licensing.</p><h3>Industry Support and Commitment</h3><p>One of the key strengths of OpenTofu lies in its broad industry support. Leading players in the infrastructure as code space, including Harness, Gruntwork, Spacelift, env0, Scalr, Digger, Terrateam, Massdriver, Terramate, and others, have thrown their weight behind this initiative. OpenTofu has garnered formal pledges from over 140 organizations and 600 individuals, reflecting a robust commitment to its success.</p><p>Moreover, OpenTofu doesn’t just stop at endorsements; it’s backed by a dedicated team of at least 18 full-time developers committed to its development over the next five years. This level of investment ensures that OpenTofu will remain a vibrant and continually evolving project.</p><p>OpenTofu’s emergence signifies a pivotal moment in the world of infrastructure as code. It promises to provide developers and organizations with a reliable, open source alternative to Terraform, fostering open collaboration and innovation while upholding the principles of freedom and accessibility. To learn more about OpenTofu and get involved in this exciting initiative, visit their <a href="https://github.com/opentofu/opentofu">GitHub repository</a> today.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2f722c9fbed2" width="1" height="1" alt=""><hr><p><a href="https://medium.com/kusho/opentofu-a-community-driven-response-to-terraforms-licensing-change-2f722c9fbed2">OpenTofu: A Community-Driven Response to Terraform’s Licensing Change</a> was originally published in <a href="https://medium.com/kusho">KushoAI</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>