zoukankan      html  css  js  c++  java
  • git更新或者还原本地代码

    error:Your local changes to the following files would be overwritten by merge:

    如果希望保留生产服务器上所做的改动,仅仅并入新配置项:

    git stash

    git pull

    git stash pop

    然后可以使用git diff -w +文件名 来确认代码自动合并的情况.

    如果希望用代码库中的文件完全覆盖本地工作版本. 方法如下:

    git reset --hard

    git pull

  • 相关阅读:
    扯一扯纯函数
    10.28
    10.27 动手动脑5
    10.26
    10.25 周总结
    10.23
    10.22
    10.21 动手动脑4
    10.20
    10.19
  • 原文地址:https://www.cnblogs.com/ilooking/p/4677279.html
Copyright © 2011-2022 走看看