zoukankan      html  css  js  c++  java
  • git push报错

    下午在做git的一些相关操作的时候,遇到了个问题,现在记录下来:

    情景:我在E盘建立了一个仓库和一个工作空间,先把仓库里面的项目clone到工作目录,然后修改工作目录里面的东西,修改了之后打算push回去仓库里面,结果,问题大了,push出现错误了:

    错误信息如下:

    remote: error: its current branch; however, this is not recommended unless you
    remote: error: arranged to update its work tree to match what you pushed in some
    remote: error: other way.
    remote: error: 
    remote: error: To squelch this message and still keep the default behaviour, set
    remote: error: 'receive.denyCurrentBranch' configuration variable to 'refuse'.
    To E:/git
    ! [remote rejected] master -> master (branch is currently checked out)
    error: failed to push some refs to 'E:/git'

    我搜索了网上相关解决方案,找到了解决方法,根据步骤。我在工作空间里面执行了以下命令:

    git config receive.denyCurrentBranch ignore(这个命令用于初次配置git的接收)
    接着我再度尝试,结果,出现了下面另一个错误:

    remote: error: other way.
    remote: error: 
    remote: error: To squelch this message and still keep the default behaviour, set
    remote: error: 'receive.denyCurrentBranch' configuration variable to 'refuse'.
    To E:/git
    ! [remote rejected] master -> master (branch is currently checked out)
    error: failed to push some refs to 'E:/git'
    Done

    经过再度思考,考虑到刚刚只是配置工作空间的git接受,但是真正的仓库还没有配置,那么就没法进行对接了,所以,我在仓库执行了相同命令,问题解决了~~

    ==================================================================
    欢迎交流:QQ392989505
    作者:王瓒
    作者:Elaine
    交流QQ:392989505
  • 相关阅读:
    (转)程序员应该知道的10个eclipse调试技巧
    Hibernate缓存
    【转】Hibernate 原汁原味的四种抓取策略
    hibernate 延迟加载和抓取策略
    移动端接口安全
    Thinkphp3.2.3中的RBAC权限验证
    单例模式--工厂模式
    php爬虫入门
    php爬虫入门
    .htaccess使用方法介绍
  • 原文地址:https://www.cnblogs.com/ITGirl00/p/3453243.html
Copyright © 2011-2022 走看看