title: Using git filters to ignore a specific line in json file
body: <p>I have following json file:</p>
  
  <pre><code>{
    "UseSqlite": false,
    "UsersAvatarsFolder": "uploads",
    "UserDefaultPhoto": "no_image.jpg"
  }
  </code></pre>
  
  <p>Now I want to tell git to ignore the <code>"UseSqlite": false,</code> line So I followed <a href="https://stackoverflow.com/a/22171275/1646540">this solution</a> to ignore this specific line using <code>.gitattributes</code>file:</p>
  
  <pre><code>*.json filter=ignoreSqlite
  </code></pre>
  
  <p>Then defined this filter in the <code>gitconfig</code>:</p>
  
  <pre><code>git config --global filter.ignoreSqlite.clean 'sed "s/"UseSqlite": .*/"UseSqlite": true/"'
  git config --global filter.ignoreSqlite.smudge cat
  </code></pre>
  
  <p>But it seems that, it doesn't work:</p>
  
  <pre><code>'sed: -c: line 0: unexpected EOF while looking for matching `''
  'sed: -c: line 1: syntax error: unexpected end of file
  error: external filter 'sed failed 1
  error: external filter 'sed failed
  On branch master
  </code></pre>
  
  <p>I am not sure about <code>sed</code> syntax. Could you please take a look at it and let me know what's the correct syntax for it?  </p>
  
  <p><strong>Update</strong>:  </p>
  
  <p>I finally fixed the syntax:</p>
  
  <pre><code>git config --global filter.ignoreSqlite.smudge "sed 's/"UseSqlite": .*/"UseSqlite": true,/'"
  git config --global filter.ignoreSqlite.clean "sed 's/"UseSqlite": .*/"UseSqlite": false,/'"
  </code></pre>
  
  <p>But it also doesn't work, I want when I push the modification, the <code>"UseSqlite"</code> be <code>true</code> and when I pull the <code>"UseSqlite"</code> be <code>false</code>. But these filters don't work like that, Any idea?</p>