I have created on branch named as "sub-branch". I am creating on file test1.txt
after switching to sub-brnach using command git checkout sub-branch
. Now when i switch to master branch using command git checkout master
without committing the changes of the sub-branch, the file test1.txt
is also shown in master branch.
Why the file test1.txt
is shown in master branch,since i have created test1.txt
file in sub-branch so it should be presented in sub-branch only.why git is showing test1.txt
file in master branch also when i do git checkout master
???.
Thanks