1、git checkout develop:转到远程的develop分支
2、git reset [commitId]:回滚到这一次提交
3、错误:
*Pushing to git@github.com:519ebayproject/519ebayproject.git
To git@github.com:519ebayproject/519ebayproject.git
! [rejected] master -> master (non-fast-forward)
error: failed to push some refs to ‘git@github.com:519ebayproject/519ebayproject.git’
hint: Updates were rejected because the tip of your current branch is behind
hint: its remote counterpart. Merge the remote changes (e.g. ‘git pull’)
hint: before pushing again.
hint: See the ‘Note about fast-forwards’ in ‘git push –help’ for details.*
因为执行了git reset命令,版本回退后没有恢复,造成本地仓库的提交版本号落后于远端仓库的提交版本号##
可以执行 git push -f命令去强制提交