I'm just interested in how git "hides" files between branches. I was looking for it but didn't find anything. So let me describe what I mean:
I have to branches master && red
Switch to the red
branch and create a new file and also commit it
git checkout red
touch test.js
git add test.js
git commit -m "Added new file for test"
ls
And i got list of files in my repo on the red
branch
README.md app.js index.html new-red.js new-test.js red.js test.js
Now let switch to the master
branch and tyle ls
git checkout master
ls
files on a master branch
README.md app.js index.html new-red.js new-test.js red.js
So how git "hides" the test.js files between branches?
Thanks