title: Parallel isolated feature branches in Git
body: <p>The project I am working on at the moment uses Git and the Gitflow Workflow methodology. I have hit a stumbling block with Gitflow which, I believe, originates from the underlying functionality of Git. The problem is regarding feature branches.</p>
  
  <p>With Subversion I could create two branches of our repository, check them out to separate Eclipse projects in my workspace and edit them in parallel. I could edit files in both of these projects in isolation from one another. Changes I made to files in one branch would not be reflected in the other, and vice versa.</p>
  
  <p>With Git, I can also create two feature branches in my repository clone. However whenever I create or edit a file in one branch, if I do not commit those changes before switching to the second branch, those changes also appear in the second branch. Likewise, if I then change the same file in the second branch, and switch to the first again, the file contains all of the changes I have made so far, regardless of which branch I was on when the change was made.</p>
  
  <p>To make matters worse, if I then add and commit my changes in the second branch, the file in the second branch will now contain all changes made from the first and second branches, and the changes disappear completely from the first branch!</p>
  
  <p>Is there any way to have feature branches isolated from one another such that files, and changes to files, are not reflected across both feature branches before committing?</p>
  
  <p>I realise that I could simply commit my changes before switching to another branch, or create a separate repository clone for each feature. However both of these approaches seem to defeat the purpose of having branches.</p>