<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Shell on Nerdsid.com</title><link>https://nerdsid.com/tags/shell/</link><description>Recent content in Shell on Nerdsid.com</description><generator>Hugo</generator><language>en-us</language><lastBuildDate>Sun, 26 Oct 2025 14:54:48 +0530</lastBuildDate><atom:link href="https://nerdsid.com/tags/shell/index.xml" rel="self" type="application/rss+xml"/><item><title>Why git add Wildcard Won’t Stage Your Nested Files (And How to Fix It)</title><link>https://nerdsid.com/posts/why-git-add-wildcard-wont-stage-nested-files/</link><pubDate>Sun, 26 Oct 2025 14:54:48 +0530</pubDate><guid>https://nerdsid.com/posts/why-git-add-wildcard-wont-stage-nested-files/</guid><description>&lt;p>I recently ran into an issue while working with Git. I had a bunch of Markdown files spread across multiple nested folders and wanted to stage them all at once. So I ran:&lt;/p>






&lt;div class="codeblock">
 &lt;div class="codeblock__header">
 &lt;div class="codeblock__filename codeblock__filename--lang">
 
 BASH
 
 &lt;/div>
 &lt;div class="codeblock__actions">
 
 &lt;/div>
 &lt;/div>
 &lt;div class="codeblock__body">
 &lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-bash" data-lang="bash">&lt;span class="line">&lt;span class="cl">git add *.md&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>
 &lt;/div>
&lt;/div>&lt;p>But only the &lt;code>.md&lt;/code> files in the current directory got added (to the staging area). The &lt;code>.md&lt;/code> files in the nested directories didn&amp;rsquo;t get added.&lt;/p>
&lt;p>The root casue: the &lt;code>*&lt;/code> wildcard isn’t processed by Git, but by the shell. So the shell was only matching them in the current folder. What a revelation!&lt;/p></description></item></channel></rss>