代码之家  ›  专栏  ›  技术社区  ›  khaleader

尝试在laravelforge中修改项目时出错

  •  1
  • khaleader  · 技术社区  · 9 年前

    我的项目是在拉拉维夫锻造与数字 首先我添加了一个合作者并将其删除,然后当我尝试通过git push origin master修改代码时 我在laravel forge的仪表板上收到这个错误

    From github.com:name/project
     * branch            master     -> FETCH_HEAD
       aad781c..e558842  master     -> origin/master
    error: Your local changes to the following files would be overwritten by merge:
        public/css/style.css
    Please, commit your changes or stash them before you can merge.
    Aborting
    Updating aad781c..e558842
    

    现在我收到一条新消息

    From github.com:project/name
     * branch            master     -> FETCH_HEAD
       be3f227..aeddc3a  master     -> origin/master
    Auto-merging .idea/workspace.xml
    CONFLICT (add/add): Merge conflict in .idea/workspace.xml
    Automatic merge failed; fix conflicts and then commit the result.
    

    谢谢你的帮助

    1 回复  |  直到 9 年前
        1
  •  1
  •   Marcin Nabiałek    9 年前

    转到Digitalocean上存储库所在的目录,然后运行

    git stash
    

    当您想保存此修改后的文件以供以后使用时

    git checkout public/css/style.css
    

    如果你不需要这个修改过的文件,你想得到你的回购中的相同文件。

    现在,您可以执行标准程序从repo获取修改后的文件( git pull 或任何其他方式)