title: Managing git ignores across branches
body: <p>Often I find myself in this situation:</p>
  <ol>
  <li>I am working in branch Foo, which has whole folders of ignored files, that do not exist in branch Bar.</li>
  <li>I checkout branch Bar to do other work.</li>
  <li>I see thousands of new/untracked files in my working copy for everything that is git ignored in branch Foo but not here in branch Bar.</li>
  <li>If during work in Bar, i try to use stash, it pulls all these files into it -- making my stashed changes impossible to read (and its really really slow).</li>
  </ol>
  <p>While I could add the git ignores for those folders, those folders do not even exist outside of Foo, so this seems awkward.</p>
  <p>Does git have any other solution? Ideally the files would only be there when the branch that uses them is checked out, but i do not want to git add them as there are too many and they are modified too frequently; it would slow git to a crawl. It's like I want them to behave as if git ignored while in their branch, and for them to be stashed when not.</p>