<?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"><channel><title><![CDATA[lef237 hashnode]]></title><description><![CDATA[lef237 hashnode]]></description><link>https://lef237.hashnode.dev</link><image><url>https://cdn.hashnode.com/uploads/logos/6aaf7a002e483eaf04eac4cd/41826dc2-be34-4f7f-bd3c-dd6ac5356529.jpg</url><title>lef237 hashnode</title><link>https://lef237.hashnode.dev</link></image><generator>RSS for Node</generator><lastBuildDate>Fri, 25 Sep 2026 07:18:47 GMT</lastBuildDate><atom:link href="https://lef237.hashnode.dev/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[Use gst to safely get an overview of all git states]]></title><description><![CDATA[Checking changed files with git status, looking at history with git log, checking diffs with git diff...
When you repeatedly jump back and forth between these commands while working, you sometimes sta]]></description><link>https://lef237.hashnode.dev/use-gst-to-safely-get-an-overview-of-all-git-states</link><guid isPermaLink="true">https://lef237.hashnode.dev/use-gst-to-safely-get-an-overview-of-all-git-states</guid><category><![CDATA[Git]]></category><category><![CDATA[cli]]></category><category><![CDATA[TUI]]></category><category><![CDATA[golang]]></category><dc:creator><![CDATA[lef237]]></dc:creator><pubDate>Sun, 20 Sep 2026 06:40:31 GMT</pubDate><enclosure url="https://cdn.hashnode.com/uploads/covers/6aaf7a002e483eaf04eac4cd/47593daa-65cb-4fea-9acb-cfe808573e06.jpg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Checking changed files with <code>git status</code>, looking at history with <code>git log</code>, checking diffs with <code>git diff</code>...</p>
<p>When you repeatedly jump back and forth between these commands while working, you sometimes start thinking, “It would be nice if I could see all the information I want right now in one place.”</p>
<p>So I created gst, a CLI tool that lets you check the state of a Git repository at a glance.</p>
<ul>
<li><a href="https://github.com/lef237/gst">lef237/gst: Read-only Git status visualizer</a></li>
</ul>
<h2>Why I built it</h2>
<p>I was teaching Git to an acquaintance who had just started programming, and they said things like:</p>
<blockquote>
<p><em>I don’t really understand git status</em></p>
</blockquote>
<blockquote>
<p><em>It’s hard to remember so many different commands</em></p>
</blockquote>
<blockquote>
<p><em>I’ve heard of tools like lazygit, but I’m scared I might accidentally change the repository state</em></p>
</blockquote>
<p>That made me think: why not build a tool that solves those problems?</p>
<p>That was the starting point for this project.</p>
<h2>What You Can See</h2>
<p>When you launch <code>gst</code>, you can view your current branch, differences from remote repositories, modified files, staged changes, working directory diffs, stashes, and the commit graph—all from your terminal.</p>
<img src="https://dev-to-uploads.s3.amazonaws.com/uploads/articles/coeqerrp7bnikc1ynu7d.png" alt="gst overview" style="display:block;margin:0 auto" />

<h2>Demo video</h2>
<p>A picture is worth a thousand words, so we have also prepared a video demonstration.</p>
<p>Watching it will give you a better sense of how <code>gst</code> works in practice and why it can be useful.</p>
<p><a class="embed-card" href="https://youtu.be/EMO3DaNkqT0">https://youtu.be/EMO3DaNkqT0</a></p>

<h2>Installation</h2>
<p>There are two ways to install it.</p>
<p>If you use Go, run:</p>
<pre><code class="language-sh">go install github.com/lef237/gst/cmd/gst@latest
</code></pre>
<p>It also supports Homebrew. You can install it with:</p>
<pre><code class="language-sh">brew install lef237/tap/gst
</code></pre>
<h2>Usage</h2>
<p>Normally, run the following command inside a repository:</p>
<pre><code class="language-plaintext">gst
</code></pre>
<p>If you want to display the information once and then exit, use --once:</p>
<pre><code class="language-shell">gst --once
</code></pre>
<p>In the TUI, you can move between views using the Tab key and arrow keys.</p>
<p>Press <code>r</code> to reload, and <code>q</code> to quit.</p>
<h2>Read-Only</h2>
<p>gst is a tool for checking the state of a repository.</p>
<p>It does not perform operations that modify the repository state, such as <code>push</code>, <code>pull</code>, <code>checkout</code>, <code>commit</code>, <code>merge</code>, or <code>rebase.</code></p>
<p>Even if you are not very familiar with Git, there is less risk of accidentally changing something, so I think it is easy to use as a tool for checking repository status.</p>
<h2>Diff display</h2>
<p>In Git, staged changes and unstaged changes in the working tree are managed separately.</p>
<p>In gst, changed files are displayed with markers such as <code>INDEX</code>, <code>WORKTREE</code>, <code>NEW</code>, and <code>CONFLICT</code>.</p>
<p>This makes it easier to understand which files are staged and which files still only have changes in the working tree.</p>
<p>In the diff view, you can switch between the working tree diff and the staged diff.</p>
<p>This is useful when you want to check what will be included in the next commit, or when you want to organize your changes before splitting them into separate commits.</p>
<h2>Copying diffs</h2>
<p>In the diff view, you can copy the current diff directly to the clipboard.</p>
<img src="https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4758g2l888o2k2fs24jk.png" alt="yank diff from gst" style="display:block;margin:0 auto" />

<p>Press <code>y</code> to copy working directory diffs, and <code>i</code> to copy staged diffs.</p>
<p>Pressing <code>a</code> copies a patch that includes all changes from <code>HEAD</code> to the current working directory.</p>
<p>The copied content is in patch format, so it can be applied with <code>git apply</code>.</p>
<p>I think this is very useful!</p>
<h2>Summary</h2>
<p><strong>gst</strong> is not a tool intended to replace Git operations.</p>
<p>Rather, it is a tool for checking “what state is this repository in right now?” before you perform an operation.</p>
<p>Please give it a try :)</p>
<p><a class="embed-card" href="https://github.com/lef237/gst">https://github.com/lef237/gst</a></p>
]]></content:encoded></item></channel></rss>