赞
踩
当我切换分支时报错:
error: The following untracked working tree files would be overwritten by checkout:
...
当前分支下这些未追踪的文件,在我即将切换来的新分支里已经被追踪了,导致git不确定如何处理这些文件。
要么告诉git直接覆盖这些文件
git checkout -f target-branch
要么将这些文件追踪起来,然后git stash保存它们,然后也就可以切换了
git add file file
git stash
git checkout target-branch
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。