如果我在git管理的项目中,创建了一个新的文件夹,文件夹里有一些新文件,直接git commit -m’xxx’、git push会报错
Your branch and 'origin/master' have diverged,
and have 3 and 8 different commits each, respectively.
(use "git pull" to merge the remote branch into yours)...
我按照提示,先退出git,再打开,先git pull,又报错
error: The following untracked working tree files would be overwritten by merge:
它会提示你有新建文件夹里的文件没有合并,要么move要么remove
所以,必须执行
git checkout 分支名 新建文件夹名