Modified files in a git branch are spilling over into another branch

后端 未结 5 1816
后悔当初
后悔当初 2020-11-22 09:01

I am working on a git repository with a master branch and another topic branch. I have switched to topic branch and modified a file. Now, if I switched to master branch that

5条回答
  •  情歌与酒
    2020-11-22 09:37

    Why is that the file is shown as modified in master branch even though it was modified in git-build branch?

    The key to remember is that the file was not modified in the git-build branch. It was only modified in your working copy.

    Only when you commit are the changes put back into whichever branch you have checked out

提交回复
热议问题