I have an empty git repo in which first I create a hello.txt file with content "pulkitsharma".
After this I added it to staging and then commited the changes in master branch. Then I create
another branch named as "new_branch" and updated the content of hello.txt with
"pulkitsharma\npulkitsharma6569@gmail.com" and didn't staged for commit. Now after this when I
checkout to master branch the content of hello.txt is updated automatically . Can anyone tell
us why this is happening because i think that during checkout to master branch there should be
an error.Why is output of git checkout master is
"M hello.txt Switched to branch 'master' "
git init
vi hello.txt
git add .
git commit -m "hello.txt added to master branch"
git checkout -b new_branch
vi hello.txt
git checkout master