title: How can I have 2 independent local Git branches off same remote branch
body: <p>I have a master branch and am working on 2 features which involve the same files. I want to have 2 local branches pointing to the same upstream master but have different changes. I don't want to commit changes locally so that IDE preserves the formatting like the border shades in<br>
  <a href="https://d3nmt5vlzunoa1.cloudfront.net/idea/files/2018/10/k8sCompletion.png" rel="nofollow noreferrer">https://d3nmt5vlzunoa1.cloudfront.net/idea/files/2018/10/k8sCompletion.png</a></p>
  
  <p>I have been unable to use git checkout successfully because when I make changes in one and switch to other branch, the unstaged changes are visible on it too. The solution I have come up with is checking out my code in 2 repos because git worktree seems to require 2 different remote branches. However, this means hard disk inefficiency. Is there a way to achieve what I want?</p>
  
  <p>I expect that when I switch between local branches, even the unstaged changes of one branch should not be visible in the other.</p>