git status on master and branches

半世苍凉 提交于 2019-12-04 18:13:21

I made few local changes in the master

That's not actually what you did. You made changes to the files in the directory. Until you commit those changes, they're not "on" any branch, they only exist in the working directory.

The "status" in question is the state of the working directory, compared to the branch that you're currently working on, which was master.

It's not that modifying one branch changes the status in another, it's that you've changed the status of your working directory. When you switched branches, the uncommitted changes stayed put. When you committed those changes to the new branch, they were no longer untracked, so Git no longer has any untracked changes to report to you.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!