! [rejected] master -> master (fetch first)error: failed to push some refs to 'https://gitee.com/youyacao/youyacao-tools-fashion.git'hint: Updates were rejected because the remote contains work that you do nothint: have locally. This is usually caused by another repository pushing tohint: the same ref. If you want to integrate the remote changes, usehint: 'git pull' before pushing again.hint: See the 'Note about fast-forwards' in 'git push --help' for details. 很多朋友都会遇到这个问题,那么有以下解决 第一种 先拉(合并拉)git pull --rebase origin master这一步我们得到 这个 问题 hint: You can instead skip this commit: run "git rebase --skip".hint: To abort and get back to the state before "git rebase", run "git rebase --abort".T (content): Merge conflict in unpackage/dist/build/mp-weixin/pages/toolshint: Disable this message with "git config advice.mergeConflict false"Could not apply adcc9c2... okuild/mp-weixin/pages/tools/aidraw.wxssCONFLICT (content): Merge conflict in unpackage/dist/build/mp-weixin/pages/tools^Cr: could not apply adcc9c2... okhint: Resolve all conflicts manually, mark them as resolved with这是说明 这个错误信息是Git在交互式变基(interactive rebase)过程中给出的提示。它表明你正在尝试修改一系列提交中的一个提交,但是Git检测到这个提交可能是无效的(例如,它可能只是修改了一个文件的空白字符,而这个文件在上游已经有了相同的改动) 我们执行git rebase --skip 这将会跳过当前提交,继续处理下一个提交。 第二种 直接强制推送不管线上分支是什么情况,就直接要以本地为准那么直接以强制推送 强制推送很简单 git push -f
|