git冲突问题
如果输入git push origin master
后
出现报错:To gitee.com:huahuagua/graduation_design.git
! [rejected] master -> master (fetch first)
error: failed to push some refs to 'gitee.com:huahuagua/graduati
on_design.git'
hint: Updates were rejected because the remote contains work tha
t you do not
hint: have locally. This is usually caused by another repository
pushing to
hint: the same ref. If you want to integrate the remote changes,
use
hint: 'git pull' before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' fo
r details. 爆红
使用git pull origin master --allow-unrelated-histories
命令解决
注意:
此操作会将远程分支内容合并到本地,但可能产生冲突,可能会覆盖本地文件,请备份后使用