<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>.gitignore on Nerdsid.com</title><link>https://nerdsid.com/tags/gitignore/</link><description>Recent content in .gitignore on Nerdsid.com</description><generator>Hugo</generator><language>en-us</language><lastBuildDate>Tue, 22 Nov 2022 23:33:25 +0530</lastBuildDate><atom:link href="https://nerdsid.com/tags/gitignore/index.xml" rel="self" type="application/rss+xml"/><item><title>How to Exclude Files When Using git add</title><link>https://nerdsid.com/posts/optimizing-your-git-workflow-excluding-files-during-git-add/</link><pubDate>Tue, 22 Nov 2022 23:33:25 +0530</pubDate><guid>https://nerdsid.com/posts/optimizing-your-git-workflow-excluding-files-during-git-add/</guid><description>&lt;h2 id="problem">Problem&lt;/h2>
&lt;p>Sometimes you want to add all files to git except some files or folders.&lt;/p>
&lt;h2 id="solution">Solution&lt;/h2>
&lt;p>You can use the &lt;code>:(exclude)&lt;/code> syntax to exclude files or folders from the &lt;code>git add&lt;/code> command. The &lt;code>:(exclude)&lt;/code> pathspec modifier is a special syntax that allows you to exclude files or folders. A pathspec is a way to specify files in Git. It is a string that describes a set of files. You can use wildcards to match multiple files. For example, &lt;code>*.html&lt;/code> matches all html files. &lt;code>**/*.html&lt;/code> matches all html files in all subfolders.&lt;/p></description></item></channel></rss>