Git checkout出现:The following untracked working tree files would be overwritten by checkout

版权声明:转载请申明出处 https://blog.csdn.net/qq_36320549/article/details/89915584

当使用命令git checkout -b [MYBRANCH] [REMOTE_BRANCH] 用于创建一个新的本地分支并从远程分支拉取代码时出现:The following untracked working tree files would be overwritten by checkout 
这是因为之前被删除的分支引起的工作树还有缓存的文件


解决办法:
git clean -d -fx (删除工作树中的缓存文件)
git checkout -b [MYBRANCH] [REMOTE_BRANCH]

猜你喜欢

转载自blog.csdn.net/qq_36320549/article/details/89915584