File changed on one branch changes on both branches

后端 未结 2 1203
广开言路
广开言路 2021-01-15 11:44

I\'m experimenting with Git on my machine. I cloned some repository and added a new branch my_branch.

In this branch, I edited a row in one source file.

2条回答
  •  深忆病人
    2021-01-15 12:02

    Your change is on no branches. If you edit a file, and don't do 'git add', let alone 'git commit', your change will just sit there unless you do something to get rid of it, like git reset --hard HEAD or git checkout PATH. If you went and made a clone of your repo you'd see that your change was not in it. If you used git log you'd see no sign of it.

提交回复
热议问题