在 git 中即使在 master 分支中也不会显示在不同分支中删除的目录

directory deleted in different branch doesn't show even in master branch in git

我正在通过教程学习 git 命令。我有一个疑问:

在我想让 git 兼容的目录中:

git init
git add .
git commit -m "initial commit of full repository"
git remote add origin bitbucket_URL
git push -u origin --all
git checkout -b feature/feature1
git rm README.txt
git add .
<didn't commit>
ls => doesn't show README.txt
git checkout master
ls => it also doesn't show README.txt 

但我从 feature1 分支中删除了 README,而不是从 master 中删除。为什么 README 没有出现在主分支的 ls 中

PS: 但是当我在添加 feature1 分支后提交然后切换到 master 分支然后执行 ls 时,README 文件出现了。有人可以解释一下下面发生的事情吗

在您提交之前,更改悬而未决。你搬到了 master,变化也随之而来......如果你在功能分支上提交,如果你签出 master,你会看到文件出现......并且 no,这不是一个错误,它是一个特性(有多少次你开始在错误的分支上工作?或者在不同的分支上测试了一些更改而不必承诺移动?好吧,你去了!!!)。