• git pull 出现non-fast-forward的错误


    1.git pull origin daily_liu_0909:liu_0909
    出现non-fast-forward的错误,证明您的本地库跟远程库的提交记录不一致,即
    你的本地库版本需要更新
    2.git reset head^
    若你的本地库已经commit最新的更改,则需要回到你的版本更改之前的版本
    3.git add .
    git stash
    版本回退之后,您的更改需要保存起来,以供后面提交
    4.git pull origin daily_liu_0909:liu_0909
    这个时候你的本地库要比远程库落后一个版本,你就可以顺利的pull到远程库的代码
    来和和本地的代码merge
    5.git stash pop
    看,这个时候我们的版本跟远程库的版本一致,我们就可以把之前的代码拿出来,重新
    add、commit了
    6.git add .
    git commit -m 'liu is handsome'
    7.git push origin liu_0909:daily_liu_0909
    这个时候你就可以选择是不是要提交这一次的commit了。

  • 相关阅读:
    c copy
    IfcVertexLoop
    qt windeployqt 日志
    IfcPolyLoop
    IfcEdgeLoop
    IfcLoop
    QTableWidget
    QList删除元素
    matlab X的负次方函数绘制2
    matlab X的负次方函数绘制1
  • 原文地址:https://www.cnblogs.com/20158424-hxlz/p/9613431.html
Copyright © 2020-2023  润新知