snipt

Ctrl+h for KB shortcuts

Bash

Ignore changes to tracked files

1
2
3
4
$ git update-index --assume-unchanged path/to/database.yml

# Find files marked as --assume-unchanged
$ git ls-files -v | grep -e "^[hsmrck]"
https://snipt.net/embed/35528a29f99407565d832103f9f25eb2/
/raw/35528a29f99407565d832103f9f25eb2/
35528a29f99407565d832103f9f25eb2
bash
Bash
4
2019-08-26T02:53:01
True
False
False
/api/public/snipt/18214/
ignore-changes-to-tracked-files
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a> <a href="#L-2">2</a> <a href="#L-3">3</a> <a href="#L-4">4</a></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span id="L-1"><a name="L-1"></a>$ git update-index --assume-unchanged path/to/database.yml </span><span id="L-2"><a name="L-2"></a> </span><span id="L-3"><a name="L-3"></a><span class="c1"># Find files marked as --assume-unchanged</span> </span><span id="L-4"><a name="L-4"></a>$ git ls-files -v <span class="p">|</span> grep -e <span class="s2">&quot;^[hsmrck]&quot;</span> </span></pre></div> </td></tr></table>
git