I had one git branche - BRANCH-1
Following are the steps I followed:
**STEP-1:** git checkout -b BRANCH-2 BRANCH-1 // creates BRANCH-2 from BRANCH-1 and switches to BRANCH-2
I make changes to some files in BRANCH-2 I do not commit
**STEP-2:** git checkout BRANCH-1 // switches to BRANCH-1
M file.name
Switched to branch 'BRANCH-1'
After STEP-2, git moves to BRANCH-1 , but it also changes the file.name on BRANCH-1.
How do I checkout/switch between BRANCH-1 and BRANCH-2 with keeping their changes only to the respective branches