0 评论

0 收藏

分享

[git相关技术] git使用 提示:本地分支落后于远程分支,提示必须要先git pull的解决方案,hint: ‘gi

! [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

优雅草论坛2022年8月11日大改,优雅草论坛变回只服务于客户的提问交流论坛,详情查看优雅草8月11日大改,原因详情查优雅草外卖乐关闭

回复

举报 使用道具

全部回复
暂无回帖,快来参与回复吧
yac2025
优雅草的临时工
主题 164
回复 0
粉丝 0