- git add -A
- git commit -m "..."
- git push origin master
-
- 此时报错:
! [rejected] master -> master (fetch first)
error: failed to push some refs to 'git@github.com:xxx'
- 此时报错:
-
- git push -f(不知道这个命令是否有用)
- 解决方案:
- git pull
- git push --force origin master
- 用以上两个命令即可解决
参考:http://michaelye1988.iteye.com/blog/1653599