Git branches behaving strangely

前端 未结 1 356
情书的邮戳
情书的邮戳 2020-12-10 18:41

It seems like I have inadvertently modified my git config such that when I switch from branchA to master all changes are automatically merged to master. This happens without

相关标签:
1条回答
  • 2020-12-10 19:27

    When you are switching branch and the files are only locally modified, Git will not give you the warning / message ( and will merge the changes into the other branch). For example, you have your repo on master, create a branch temp, have a local modification on the file. Now, when you switch to master you won't get the message. If on the other hand you makes changes in temp and commit them ( that is temp diverges from master ) and then you have local modifications, it will give you that message when you switch to master

    0 讨论(0)
提交回复
热议问题