error: Your local changes to the following files would be overwritten by checkout:
    .idea/workspace.xml Please commit your changes or stash them before you switch branches.
强制切换分支
强制切换分支命令如下,结果同提示说的那样,会直接覆盖未跟踪的文件。这个方式我觉得很是粗暴,我们日常切换的时候,还是不要使用 -f 强制切换,没有覆盖提示,很容易发生文件修改丢失,但是我们自己不知道。
git checkout -f   
                    
 
                                         
                                                                                         
                                                                                         
                                                                                         
                                                                                        