title: Best way to have development and deployment branches with disjoint sets of files where one generates the other
body: <p>What is the best way to have one branch for "source" files, and another branch that stores files generated by those source files? Example:</p>
  
  <pre><code>Dev branch:
  
    Tracked: 
     - test.c
     - Makefile
  
  Deployment branch:
  
    Tracked:
     - test.exe
  </code></pre>
  
  <p>Then when the makefile is executed:</p>
  
  <pre><code>Dev branch:
  
    Tracked: 
     - test.c
     - Makefile
  
    Untracked:
     - test.exe
  
  Deployment branch:
  
    Tracked:
     - test.exe
  </code></pre>
  
  <p>Then I want to commit the changes made to test.exe to the deployment branch without committing it to the development branch.</p>
  
  <p>I have tried creating the "deployment" branch off of the "development" branch, deleting the development files and committing the deployment files, but I don't know how to communicate changes from the untracked test.exe in the development branch to the deployment branch. I have also tried to <code>git stash -u</code> the untracked test.exe, switch to the deployment branch and apply the stash, but git refuses to overwrite the existing test.exe. I can manually delete it, but this creates the new problem of having to delete things before unstashing them and it gets unruly for large numbers of files.</p>
  
  <p>I know I could copy the files to another directory, checkout the deployment branch, move them back and commit them, but that's obviously horrible.</p>