你的位置:首页 > ASP.net教程

[ASP.net教程]git操作之常见问题解决方案


一、版本不一致

  1. 错误信息:    

1 > git push -u origin master2 To ******.git3 ! [rejected]    master -> master (non-fast-forward)4 error: failed to push some refs to '*******.git'5 hint: Updates were rejected because the tip of your current branch is behind6 hint: its remote counterpart. Integrate the remote changes (e.g.7 hint: 'git pull ...') before pushing again.8 hint: See the 'Note about fast-forwards' in 'git push --help' for details.

  2. 错误原因: 本地和远程两个版本不一致。

  3. 解决方案: git push -u origin -f

  4. 注: 加'-f'的意思是-强制推送本地的替换服务端, 所以三思后行。

未完待续...