美文网首页
解决git pull 报错

解决git pull 报错

作者: gsunneverdie | 来源:发表于2023-06-09 21:23 被阅读0次
git fetch
git merge origin/$CURRENT_BRANCH
  • Git 将合并远程仓库中名为origin(你克隆的那个)的改动
  • 添加到`$CURRENT_BRANCH'中的变化
  • 这些将会在你的本地签出的分支中的改动
  1. 不关心本地修改(未提交),直接覆盖
git fetch
git reset --hard HEAD
git merge origin/$CURRENT_BRANCH
或
git fetch --all
git reset --hard origin/SCURRENT_BRANCH
git pull
  1. 缓存本地修改
git fetch
git stash // 暂存本地修改
git merge origin/$CURRENT_BRANCH
git stash pop // 取出本地修改

相关文章

网友评论

      本文标题:解决git pull 报错

      本文链接:https://www.haomeiwen.com/subject/wpwzedtx.html