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
  • 相关阅读:
    mingw-gcc-9.0.1-i686-posix-sjlj-201903
    MSYS 编译 nginx rtmp-module
    MinGW GCC 8.3.1 2019年2月23日 出炉啦
    城市区号SQL
    HCN网络技术实验指南2
    HCN网络技术实验指南1
    CCNA实验攻略1:配置Cisco交换机
    HCDA-7-配置ssh远程管理
    HCDA-6-配置telnet远程管理
    4.1 子网划分基础
  • 原文地址:https://www.cnblogs.com/ITGirl00/p/3453243.html
Copyright © 2011-2022 走看看