title: How to keep track of debug code in DEV branch, but remove it on MASTER
body: <p>I have a problem related with GIT.
  Imagine this branch schema:</p>
  
  <pre><code> MASTER
     |
    DEV
     |
  FEATURE1
  </code></pre>
  
  <p>Where "<strong>DEV</strong>" is the branch where we review the code, and the debug code (in this case, <code>console.log</code> and similar) should NOT be included there, and 'FEATURE1' is where I do my work, and for that I want to keep debug code tracked.</p>
  
  <p>I'm using 2 hooks (pre-commit &amp; post-commit):</p>
  
  <p><a href="https://pastebin.com/jhDVQhES" rel="nofollow noreferrer">pre-commit</a></p>
  
  <p><a href="https://pastebin.com/yNQJK6an" rel="nofollow noreferrer">post-commit</a></p>
  
  <p>This works if I commit the changes in the "<strong>DEV</strong>" branch, since it basically clones the changes, stashes them before the commit and un-stashes them after, but that misses the point of having a "<strong>FEATURE</strong>" branch, and will only allow me to have the debug code locally (I might need to full checkout the project in a different device and I want to be able to recover my debug code...)</p>
  
  <p>The workflow I got until now is basically commiting normally to the FEATURE branch, and then cherrypick it in the DEV branch like so:
  <code>git cherry-pick -x COMMITid --no-commit; git commit --reuse-message=COMMITid</code></p>
  
  <p><strong>---- TD;DR ----</strong></p>
  
  <p>I'm looking for a way to remove console.log when commiting/merging to specific branches (<em>master</em> &amp; <strong>dev</strong>, in this case)</p>