方法一,删除远程分支再提交①首先两步保证当前工作区是干净的,并且和远程分支代码一致$ git co currentBranch$ git pull origin currentBranch$ git co .