git checkout develop
> Switched to branch "develop"
git merge --no-ff master
> Already up-to-date
git checkout master
> Switched to branch "master"
git merge --no-ff develop
> Already up-to-date
但是......
git diff --shortstat master develop
> 725 files changed, 0 insertions(+), 297085 deletions (-)
发生了什么事? 如何完全重新同步2个分支?
答案 0 :(得分:3)
尝试从索引中删除所有文件:
git rm -r --cached .
然后
git add *
git commit -m "title_commit"
git checkout master
git merge develop