Hi,
I am learning Git system these days. I have made a new folder in ubuntu and in terminal did this:
- git init
- then made a file testfile1.txt
- then made a branch using "git branch newbranch"
- then checkout to this branch.
- then, made a new file in the branch testfile2.txt and added some content.
- then i switched to master branch.
- then "ls". there also I was able to see this file. (BIG DOUBT, why I saw this file in master branch.)
- Then I switched again to newbranch and "git add ." --> "git commit" then again i switched to the master branch and then "ls".
- Now, I was not able to see testfile2.txt but obviously it was there in newbranch.
Can you help me visualize that why I was able to see the file till I didn't commit the file? Please help.